Have a look here on how to add a folder to your support path
http://www.afralisp.net/visual-lisp/...isp-part-2.php
Registered forum members do not see this ad.
Click this link to see the whole routine:
http://www.afralisp.net/archive/vl/acadset.htm
THis part is where my question is:
How would I modify the code so my current search paths remain asthey are, so the new paths are to be added? I am in the middle of something but whenever I execute the routine, it copies the profile like it should but the SFSP's are overwritten with the new ones?Code:;;;================================= ;;;Set up the AfraLisp Support Paths ;set the path to the AfraLisp subdirectory. (setq netpath "C:\\AfraLisp2002") ;set the support paths to the AutoCAD default (setenv "ACAD" "") ;store the default paths (setq defpath (getenv "ACAD")) ;set up the AfraLisp paths (setenv "ACAD" (strcat defpath ";" netpath ";" netpath "\\" "Menu;" netpath "\\" "CadLisp2k;" netpath "\\" "CadLib2k;" netpath "\\" "CadMech;" netpath "\\" "Hatching;" netpath "\\" "Help;" netpath "\\" "Profiles;" )) ;set up the custom template path (setenv "TemplatePath" (strcat netpath "\\" "Templates")) ;inform the user (prompt "\nAfraLisp Support Paths Defined\n") ;;;================
Sorry if I am not totally clear... my goal is to keep the SFSP and ADD the new ones, not loose the old ones.
Any help is appreciated, as allways.
BTW: all credits to AfraLisp of course!!




Have a look here on how to add a folder to your support path
http://www.afralisp.net/visual-lisp/...isp-part-2.php
Here's one I compiled for work...
Code:(defun c:CES-Setup (/ #Files #Layout #Flag) (vl-load-com) (and (not (vl-catch-all-error-p (vl-catch-all-apply '(lambda () (setq #Files (vla-get-files (vla-get-preferences (vlax-get-acad-object)) ) ;_ vla-get-files #Layout (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object)) ) ;_ vla-get-activelayout ) ;_ setq ;; ********************* ;; ** AutoSave Path ** ;; ********************* (mapcar 'vl-mkdir (list "c:\\TEMP" "c:\\TEMP\\ACAD")) (vla-put-autosavepath #Files "c:\\TEMP\\ACAD") ;; *************************** ;; ** Printer Config Path ** ;; *************************** (vla-put-PrinterConfigPath #Files "s:\\cadd standards\\Plotters" ) ;_ vla-put-PrinterConfigPath (vla-refreshplotdeviceinfo #Layout) ;; *********************** ;; ** Plotstyles Path ** ;; *********************** (vla-put-printerstylesheetpath #Files "s:\\cadd standards\\Plotstyles" ) ;_ vla-put-printerstylesheetpath (vla-refreshplotdeviceinfo #Layout) ;; ********************* ;; ** Template Path ** ;; ********************* (vla-put-TemplateDwgPath #Files "s:\\cadd standards\\Template" ) ;_ vla-put-TemplateDwgPath ;; ********************* ;; ** QNew Template ** ;; ********************* (vla-put-QNewTemplateFile #Files "s:\\cadd standards\\Template\\CES_Template.dwt" ) ;_ vla-put-QNewTemplateFile ;; ********************* ;; ** Support Paths ** ;; ********************* (vla-put-supportpath #Files (strcat ";s:\\cadd standards\\startup" ";s:\\cadd standards\\lisp" ";s:\\cadd standards\\linetypes" ";s:\\cadd standards\\fonts" ";s:\\cadd standards\\ces layers" ";" (vla-get-supportpath #Files) ) ;_ strcat ) ;_ vla-put-supportpath ;; *************************** ;; ** Tool Palettes Paths ** ;; *************************** (vla-put-ToolPalettePath #Files (strcat "S:\\CADD Standards\\Toolpalette\\Palettes;" (vla-get-ToolPalettePath #Files) ) ;_ strcat ) ;_ vla-put-ToolPalettePath ) ;_ lambda ) ;_ vl-catch-all-apply ) ;_ vl-catch-all-error-p ) ;_ not (alert (strcat "AutoCAD has been setup for Capital Engineering & Surveying, Inc. Standards.\n\n" " Please restart AutoCAD." ) ;_ strcat ) ;_ alert ) ;_ and (princ) ) ;_ defun (alert "Type: \"CES-SETUP\" to run setup.") (princ)
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
Thanks guys!!
Now let me do some homework tonight!!
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
Okay, that I could not see.
Since you (and maybe many others) have walked that way, I believe it might be a good way!
I did read it Alan, and read the comments. Allready played with it, not succesfull but that will work out.
I have a routine alike yours, but I do not need so many things to set. (I use toolpalettes and SFSP..) My problem is to add... like I said.
Thank you very much for the response, I can go on for a while now![]()
Last edited by alanjt; 26th Apr 2010 at 11:10 pm. Reason: retarded typos
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
You mean it only works if the path exist, am I right?
How come that this does not work:
... while the map "C:\MarcoW" does existCode:(vla-put-supportpath #Files (strcat ";C:\\MarcoW" ";" (vla-get-supportpath #Files) ) ;_ strcat )
Another question, and maybe it has got something to do with it:
What's up with the ";" in the code (what I made blue above).
What does that thing do in the code? I ask because in my code it seems to be on the end of the line...
Thanks for helping me out.
Registered forum members do not see this ad.
What you posted works fine on my end. Actually, it added it without having the path created.
As far as the semicolon goes, it's just to break to the next path (multiple paths). I just put it in the beginning because it just seemed a little cleaner/neater to put it first.
It's just like using "\n" in a string.
eg.
(strcat "\nALAN" "\nThompson") = (strcat "\nALAN\n" "Thompson")
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
Bookmarks