Ahankhah Posted April 20, 2011 Share Posted April 20, 2011 Does any way exist to find out all settings in Files Tab of Options via AutoLISP, then change them to desired values? Quote Link to comment Share on other sites More sharing options...
pBe Posted April 20, 2011 Share Posted April 20, 2011 Does any way exist to find out all settings in Files Tab of Options via AutoLISP, then change them to desired values? Getenv Setenv or (vla-get-files (vla-get-preferences (vlax-get-acad-object))) See attached: AutoCAD Environment Variable Quick Guide.pdf Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted April 20, 2011 Share Posted April 20, 2011 you can find something here: http://rkmcswain.blogspot.com/2007/02/setting-support-paths-via-lisp.html kruuger Quote Link to comment Share on other sites More sharing options...
Ahankhah Posted April 20, 2011 Author Share Posted April 20, 2011 pBe, thank you for your reply. GetenvSetenv I don't know how to use getenv and setenv, i.e. I have no knowledge about the name of the variables. (vla-get-files (vla-get-preferences (vlax-get-acad-object))) The code is very good to get environment variables, so thank you for the help, but how to set variables? Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted April 20, 2011 Share Posted April 20, 2011 few sample: (setq *files* (vla-get-files (vla-get-preferences (vlax-get-acad-object)) ) ) (vla-get-TempDirectory *files*) (vla-put-TempDirectory *files* "C:\\Temp\\") (vla-get-PrinterConfigPath *files*) (vla-put-PrinterConfigPath *files* "\\\\ahi\\support\\CAD_Install\\LD6\ahi\\PLOTTERS") ok ? kruuger Quote Link to comment Share on other sites More sharing options...
pBe Posted April 20, 2011 Share Posted April 20, 2011 updated the post, attached pdf for SETENV/GETENV rererence for you as for vl IAcadPreferencesFiles: This object contains the options from the Files tab on the Options dialog Property values: AltFontFile = AltTabletMenuFile = Application (RO) = # AutoSavePath = ColorBookPath = ConfigFile (RO) = CustomDictionary = CustomIconPath = DefaultInternetURL = DriversPath = EnterpriseMenuFile = FontFileMap = HelpFilePath = LogFilePath = MainDictionary = MenuFile = PageSetupOverridesTemplateFile = PlotLogFilePath = PostScriptPrologFile = PrinterConfigPath = PrinterDescPath = PrinterStyleSheetPath = PrintFile = PrintSpoolerPath = PrintSpoolExecutable = QNewTemplateFile = SupportPath = TempFilePath = TemplateDwgPath = TempXrefPath = TextEditor = TextureMapPath = ToolPalettePath = WorkspacePath = Methods supported: GetProjectFilePath (1) SetProjectFilePath (2) (vla-put-QNewTemplateFile VarName "NewValue") where VarName is product of (setq VarName (vla-get-files (vla-get-preferences (vlax-get-acad-object)))) to check if an object has a specified property (vlax-property-available-p VarName 'DriversPath) or (setenv QnewTemplate "NewValue") Setenv variable name is case sensitive so be careful with that Hope this helps Quote Link to comment Share on other sites More sharing options...
Ahankhah Posted April 20, 2011 Author Share Posted April 20, 2011 you can find something here:http://rkmcswain.blogspot.com/2007/02/setting-support-paths-via-lisp.html kruuger Kruuger, thank you for your aim, but in my country the address is FILTERED:shock:. Quote Link to comment Share on other sites More sharing options...
Ahankhah Posted April 20, 2011 Author Share Posted April 20, 2011 pBe and Kruuger, thanks for your help. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 20, 2011 Share Posted April 20, 2011 Kruuger, thank you for your aim, but in my country the address is FILTERED:shock:. That sucks. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 21, 2011 Share Posted April 21, 2011 Just a suggestion when setting your paths you may want to use strcat and read existing paths and add your own then update paths this way you dont stuff up the generic Autocad ones. Every body like me about to load 2012 this will help setups as we 13 to do. Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 21, 2011 Share Posted April 21, 2011 This is not my most updated one, but it should be good enough... http://www.cadtutor.net/forum/showthread.php?47308-Need-some-help-on-this-quot-Afralisp-routine-quot-%28to-modify-it...%29&p=321057&viewfull=1#post321057 Quote Link to comment Share on other sites More sharing options...
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.