Jump to content

Adding support paths via acaddoc.lsp


pixel8er

Recommended Posts

Good morning

Is it possible to add new support paths via the acaddoc.lsp file? I want to add new paths to:

 

1. Support File Search Path

2. Printer Support File Path

3. Template Settings

 

I need to do this in the AutoCAD 2013 Mac version so no VisualLISP. I'm not even sure where to start

 

Thanks

Paul

Link to comment
Share on other sites

I have tried this but doesn't work

 

;;Sets the support file search paths
(setenv "SupportFilePath" (strcat "/Users/PlaceLab03/Desktop/_Library/Lisp)) 
(setenv "SupportFilePath" (strcat "/Users/PlaceLab03/Desktop/_Library))

 

Paul

Link to comment
Share on other sites

Hi dbroda

Yes I can but I'm trying to do this remotely on multiple computers. Thought it would be best via lisp

Regards

Paul

Edited by pixel8er
Link to comment
Share on other sites

Not sure about Mac version:

 

(setenv "ACAD" "path;path;path.....")

 

I guess the reason for ACADDOC.LSP is because you are wanting to "re-path" for every CAD Station to discourage the users from tweaking the SFSP for their own liking.

Link to comment
Share on other sites

But, do you have to do that for every single file opened?

That is what acaddoc.lsp is for!

By default, the acad.lsp file is loaded only once, when AutoCAD starts, whereas acaddoc.lsp is loaded with each individual document (or drawing). This lets you associate the loading of the acad.lsp file with application startup, and the acaddoc.lsp file with document (or drawing) startup.

Link to comment
Share on other sites

pBe - Thanks - that got me thinking and researching a bit more. Yes acaddoc.lsp to stop users modifying things.

 

togores - Thanks - maybe it's overkill and I should stop being paranoid but I want to make sure the file paths remain as they should be. There is probably a much neater way of doing this but my knowledge is not enough to implement it.

 

So after tweaking further this is what I have:

 

;;set the path to the subdirectory.
(setq netpath "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD")

;;set the support paths to the AutoCAD default
(setenv "ACAD" "")

;;store the default paths
(setq defpath (getenv "ACAD"))

;;set up the support file search paths
(setenv "ACAD" (strcat 
defpath ";"
netpath ";"
netpath "\\" "Blocks;"
netpath "\\" "Lisp;"
netpath "\\" "Logos;"
netpath "\\" "PC3;"
netpath "\\" "Plotstyles;"
))

;;set up the template settings paths
(setenv "QnewTemplate" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\Templates\\PlaceLab.dwt")
(setenv "SheetSetTemplatePath" "C:\\Users\\Paul&Jen\\Documents\\_Library\\AutoCAD\\Templates\\_SheetSets")
(setenv "TemplatePath" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\Templates")

;;set up the printer support file paths
(setenv "PrinterStyleSheetDir" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\Plotstyles")
(setenv "PrinterConfigDir" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\PC3")

;;inform the user
(prompt "\nSupport Paths Defined\n")

Link to comment
Share on other sites

A couple of ways maybe on MAC ? On the Pc we copy and alter the autocad desktop ICON to recognise another profile on start up of autocad its the /p > bit changed. /p C3D2013. In windows right click ICON then edit properties "Target"

 

All you do is set all your paths etc then save a profile important part here is set your main customization menu to some where else as well in our case its \USERS\USERID.

 

Copy your new ARG file and your CUI to this new directory that you have pathed to.

 

Important you start Autocad as normal load your new profile so its available make it current then exit Autocad using your new ICON it should all load perfectly (we have 8 pc's) remove old icon to a directory in case of failure.

 

Heres an expanded version of setting the majority of stuff in your CONFIG FILES

 

; resets the paths usefull for update versions of Autocad
; by BIGAL 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)
; make temp directory
;(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\\BIGAL")
; 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\\my.dwt")
;make new support paths exist + new
(setq paths (vla-get-SupportPath *files*))

(setq coggpaths 
 "P:\\autodesk\\supportfiles;
 P:\\autodesk\\lisp;
 P:\\autodesk\\fonts;
 P:\\autodesk\\hfs fonts;"
 )
(setq newpath (strcat coggpaths paths))
(vla-put-SupportPath *files* newpath)
; Tempdirectory 
;(vla-get-TempFilePath *files*))
(vla-put-TempFilePath *files* "C:\\AcadTemp\\")
;   PlotLogFilePath = "C:\\Documents and Settings\\AD\\local 
settings\\application data\\autodesk\\c3d 2011\\enu\\"
(vla-put-PlotLogFilePath *files* "C:\\AcadTemp\\")
;   LogFilePath = "C:\\Documents and Settings\\AD\\local 
settings\\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*
(vlax-release-object *files*)
; exit quitely
(princ "All Done")

Link to comment
Share on other sites

Hi BIGAL

Thanks for your reply. Unfortunately the Mac version has no VisualLisp - among other things, though does have Project Manager now which is similar to Sheet Set Manager - so I was trying for a more basic way to get the same result.

Regards

Paul

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...