agmartin Posted September 25, 2012 Posted September 25, 2012 Hi, First of all i am quite newbie in AutoCAD. I want to create a .bat file or any executable file which runs "acad.exe", adds a PostGIS Connection, and loads 3 specific tables of the public schema in the postgis database. I need this because i dont want the person that will be executing the file daily,be able to stablish the connection (he doesnt have to know the password for the connection to postgis) and doesnt have to be able to add any other table to the workspace apart from these 3 tables. Regards, Aitor Quote
BIGAL Posted September 26, 2012 Posted September 26, 2012 You could write a lisp that checks the user ID on normal startup of Acad by adding load "myusergis.lisp" to ACADDOC.lsp and then runs the necessary steps. You can also add to the history list using Appload User name (setq whoisit (GETENV "username")) Quote
agmartin Posted September 27, 2012 Author Posted September 27, 2012 Im quite newbie in Autocad and I dont know very well how it works and what do al thoes archives do. Could you extend your explantion so i can get the idea of what you mean? Quote
BIGAL Posted September 28, 2012 Posted September 28, 2012 Write down all the steps starting with a normal open autocad you then need to create a program to do the same steps, it can be a VBA .net LSP or a script. The code above would be used to check for a user name if match found then run program. Recreate the steps in notepad save as a script file for testing, then post a copy here we can advise further, obviously correct password not required. Once you have it you can add to the "Auto" startup options say acaddoc.lsp to run every time autocad starts. Copy and paste line above (....)) to command line it should return your login name. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.