Defining a "source file search file" path thru Lisp or command line

Defining a "source file search file" path thru Lisp or command line

cyberflow
Advisor Advisor
1,266 Views
3 Replies
Message 1 of 4

Defining a "source file search file" path thru Lisp or command line

cyberflow
Advisor
Advisor

Hi,


I was asking myself it there was a command line that could add a source file search path ?

Or a lisp that can do this ?

I would simply like to create a little lisp that i can run when i freshly reinstall or install a new version.

 

Been googling all morning on this and didn't see nothing that i could inspire myself to try and create this.

And no, I don't want to work with CUI profiles.

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
1,267 Views
3 Replies
Replies (3)
Message 2 of 4

cadffm
Consultant
Consultant

The answer depends on what you answer here:

Search path FOR WHAT?

 

90% will searched by the SupportPathes, in Autocad they are stored in the enviroment variable ACAD

(getenv "ACAD")

 

Sebastian

0 Likes
Message 3 of 4

Sea-Haven
Mentor
Mentor

Something like this

 

; resets the paths usefull for update versions of Autocad
; by A Houston 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* "C:\\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.dwt")

;make new support paths exist + new
(setq paths (vla-get-SupportPath *files*))
(setq xxxxpaths "P:\\autodesk\\supportfiles;P:\\autodesk\\lisp;P:\\autodesk\\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\\ah02490.xxxx-AD\\localsettings\\application data\\autodesk\\c3d 2011\\enu\\"
(vla-put-PlotLogFilePath *files* "C:\\AcadTemp\\")

;   LogFilePath = "C:\\Documents and Settings\\ah02490.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*
)
(setpaths)

; exit quitely
(princ "All Done")

 

 

Message 4 of 4

cyberflow
Advisor
Advisor

@Sea-Haven Thx for the code, il'l try to test it this week
Been pretty busy with some projects !

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes