Dj_T_Rex2002 Posted July 23, 2018 Posted July 23, 2018 Ok so I am no expert with LISPs but LOVE learning new stuff. I just worked with this LISP by looking at other peoples LISPs and modified mine like the bottom code. However, I do not know how to set it to fill in the Trusted Locations, Plot Style Table Search Path, AutoSave since I am thinking the (vla-put-...) part might be wrong? I have been trying different VLA paths from the list on a website and cannot make it work. Please help and thank you ahead of time. (vl-load-com) (vla-put-supportpath (vla-get-files (vla-get-preferences (vlax-get-acad-object))) (strcat "C:\\Users\\<username>\\AppData\\Roaming\\Autodesk\\AutoCAD 2018\\r22.0\\enu\\support; C:\\Users\\<username>\\AppData\\Roaming\\Autodesk\\ApplicationPlugins\\AdnPlugin-Screenshot.bundle\\Contents\\Resources; C:\\Users\\<username>\\AppData\\Roaming\\Autodesk\\ApplicationPlugins; C:\\Program Files\\Autodesk\\AutoCAD 2018\\Support; C:\\Program Files\\Autodesk\\AutoCAD 2018\\Express; C:\\Program Files\\Autodesk\\ApplicationPlugins\\Autodesk AppManager.bundle\\Contents\\Resources; C:\\Program Files\\Autodesk\\ApplicationPlugins\\Autodesk AppManager.bundle\\Contents\Windows\\2018; C:\\Program Files\\Autodesk\\ApplicationPlugins\\Autodesk FeaturedApps.bundle\\Contents\\Resources; C:\\Program Files\\Autodesk\\ApplicationPlugins\\Autodesk FeaturedApps.bundle\\Contents\\Windows\\2018\\Win64; C:\\Program Files\\Autodesk\\ApplicationPlugins\\coldwater4.bundle; C:\\Program Files (x86)\\Autodesk\\ApplicationPlugins\\Autodesk AppManager.bundle\\Contents\\Resources; C:\\Program Files (x86)\\Autodesk\\ApplicationPlugins\\Autodesk AppManager.bundle\\Contents\\Windows\\2018; C:\\Program Files (x86)\\Autodesk\\ApplicationPlugins\\Autodesk FeaturedApps.bundle\\Contents\\Resources; C:\\Program Files (x86)\\Autodesk\\ApplicationPlugins\\Autodesk FeaturedApps.bundle\\Contents\\Windows\\2018\\Win64; C:\\Program Files (x86)\\autodesk\\ApplicationPlugins\\ColdWater4.bundle; J:\\Active Projects\\Detailers\\<name>\\Misc\\LISPS; J:\\Active Projects\\Detailers\\<name>\\Misc\\LISPS\\STL Goes in the Support Folder;" ) ) ;; For Trusted Locations (vl-load-com) (vla-put-PrinterConfigPath (vla-get-files (vla-get-preferences (vlax-get-acad-object))) (strcat "X:\\Drawing Utilities\\Plot Styles;" ) ) ;; for Plot Style Table Search Path ;; for AutoSave (vl-load-com) (vla-put-QNewTemplateFile (vla-get-files (vla-get-preferences (vlax-get-acad-object))) (strcat "E:\\engaccess\\start 36.dwt;" ) ) Quote
ronjonp Posted July 23, 2018 Posted July 23, 2018 Use vla-put-PrinterStyleSheetPath for your plot style path. You also might want to append to the support paths rather than completely overwriting them. This will show you the options available: (vlax-dump-object (vla-get-files (vla-get-preferences (vlax-get-acad-object))) t) You can also set the support paths like so: (setenv "ACAD" (strcat (getenv "ACAD") ";C:\\")) Quote
BIGAL Posted July 24, 2018 Posted July 24, 2018 Have a look at this should have all you want includes trusted paths and menus. ; resets the paths usefull for update versions of Autocad ; by A H 2011 ; This sets a reference to the install path of your product ; the gets are their for info maybe other use ; use this to find other settings ;(vlax-dump-object (vla-get-files (vla-get-preferences (vlax-get-Acad-object))) T) (vl-load-com) (defun setpaths ( / *files* doc) ; make temp directory (if (vl-file-directory-p "C:\\Acadtemp\\") (Princ "Acadtemp exists") (vl-mkdir "C:\\AcadTEMP\\") ) (setq *files* (vla-get-files (vla-get-preferences (vlax-get-Acad-object)))) ; savepath ;(vla-get-AutoSavepath *files*) (vla-put-AutoSavepath *files* "C:\\AcadTemp") ; custom icons ;(vla-get-CustomIconPath *files*)) (vla-put-CustomIconPath *files* "P:\\Autodesk\\ICONS") ; custom menu ;(vla-get-Menufile *files*)) ;(vla-put-Menufile *files* "C:\\Users\\2013XXXX") ; printers config ;(vla-get-PrinterConfigPath *files*) (vla-put-PrinterConfigPath *files* "P:\\AutoDESK\\Plotting\\Plot Styles 2011") ; printers style sheet ;(vla-get-PrinterStyleSheetPath *files*) (vla-put-PrinterStyleSheetPath *files* "P:\\AutoDESK\\Plotting\\Plot Styles") ; printer drv's ;(vla-get-PrinterDescPath *files*) (vla-put-PrinterDescPath *files* "P:\\AutoDESK\\Plotting\\Drv") ; print spooler ;(vla-get-PrintSpoolerPath *files*) (vla-put-PrintSpoolerPath *files* "C:\\AcadTemp\\") ; template path ;(vla-get-TemplateDwgPath *files*) (vla-put-TemplateDwgPath *files* "P:\\Autodesk\\c3d Templates") ; template location ;(vla-get-QnewTemplateFile *files*) (vla-put-QnewTemplateFile *files* "P:\\Autodesk\\c3d Templates\\XXXX-2019.dwt") ;make new support paths exist + new (setq paths (vla-get-SupportPath *files*)) (setq XXXXpaths "P:\\autodesk\\supportfiles;P:\\autodesk\\lisp;P:\\autodesk\\fonts;P:\\autodesk\\hfs fonts;") (setq newpath (strcat XXXXpaths paths)) (vla-put-SupportPath *files* newpath) ; Tempdirectory ;(vla-get-TempFilePath *files*)) (vla-put-TempFilePath *files* "C:\\AcadTemp\\") ; PlotLogFilePath = "C:\\Documents and Settings\\BIGAL.XXXX-AD\\localsettings\\application data\\autodesk\\c3d 2011\\enu\\" (vla-put-PlotLogFilePath *files* "C:\\AcadTemp\\") ; LogFilePath = "C:\\Documents and Settings\\BIGAL.XXXX-AD\\localsettings\\application data\\autodesk\\c3d 2011\\enu\\" (vla-put-LogFilePath *files* "C:\\AcadTemp\\") ; xref temp path ;(vla-get-TempXrefPath *files*)) (vla-put-TempXrefPath *files* "C:\\AcadTemp\\") ; end use of *files* (setq oldtrust (getvar 'trustedpaths)) (setq newtrust (strcat oldtrust ";" "p:\\Autodesk...")) (setvar 'trustedpaths newtrust) (command "menuload" "p:\\autodesk\\hfs Fonts\\hfs-XXXX") (menucmd "P19=+HFS.POP1") (command "menuload" "p:\\autodesk\\lisp\\surfal") (menucmd "P20=+SURFAL.POP1") (command "menuload" "p:\\autodesk\\lisp\\XXXXSTDS9") (menucmd "P21=+XXXXSTDS.POP1") (command "menuload" "p:\\autodesk\\lisp\\XXXX2011") (menucmd "P22=+XXXX2011.POP1") ) ; defun (setpaths) (alert "Run user script for toolbars") ; exit quitely (princ "All Done") 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.