Jump to content

Recommended Posts

Posted

Dear Gurus,

After reviewing many of your posts about adding support paths in Autocad and then trying to simplify the coding and make it my own, I have been unsuccessful.

 

I am simply trying to add support paths from our server via our office pulldown menu. I have tried to run a script that loads a lisp that reads a text file with the hardcoded server paths separated by semicolons. No luck because there is usually too much stuff I am trying to simplfy and I'm cutting out the wrong things.

 

The following are the directories:

T:\030_CADD Resources\ADT Resources\ADT Support\Layer Scripts\JPA Layer Scripts;

T:\030_CADD Resources\ADT Resources\ADT Support\Menus;

T:\030_CADD Resources\ADT Resources\DimStyles;

T:\030_CADD Resources\ADT Resources\Graphic Symbols\Accessories;

T:\030_CADD Resources\ADT Resources\Graphic Symbols\Annotation;

T:\030_CADD Resources\ADT Resources\Graphic Symbols\Electrical;

T:\030_CADD Resources\ADT Resources\Graphic Symbols\Equipment;

T:\030_CADD Resources\ADT Resources\Graphic Symbols\Mechanical;

T:\030_CADD Resources\ADT Resources\Graphic Symbols\Plumbing

 

Eventually, after I get these to work, I would like to set things like DRAWING TEMPLATE, PLOTTER DESCRIPTIONS, ETC.. First things first.

 

Any help about writing the line in the menu file and the lisp routine would truly be appreciated!

 

Thank you,

Timothy

Posted

Nope. Got stuck right at "Console window" I put the

_$ (setq thePath (strcat thePath ";" "C:\\TEMP"))

at the command line and got a bad argument type. I then copied into Notepad and named the file AddSupportPaths.lsp. I then APPLOADed the file but nothing. I guess because I have not run anything.

If you can, please dumb down you explanation if possible.

Thank you.

Posted

I can't take full credit...

This worked for me the one time I tried it.

(defun c:asp ()
 (vl-load-com)
 (setq    acadObject    (vlax-get-acad-object)
   prefsObject   (vlax-get-property acadObject 'Preferences)
   tabnameObject (vlax-get-property prefsObject 'Files)
   thePath          (vlax-get-property tabnameObject 'SupportPath)
 ) ;_ end of setq
 (setq    thePath
    (strcat
      thePath
      ";"
      "T:\\030_CADD Resources\\ADT Resources\\ADT Support\\Layer Scripts\\JPA Layer Scripts;
T:\\030_CADD Resources\\ADT Resources\\ADT Support\\Menus;
T:\\030_CADD Resources\\ADT Resources\\DimStyles;
T:\\030_CADD Resources\\ADT Resources\\Graphic Symbols\\Accessories;
T:\\030_CADD Resources\\ADT Resources\\Graphic Symbols\\Annotation;
T:\\030_CADD Resources\\ADT Resources\\Graphic Symbols\\Electrical;
T:\\030_CADD Resources\\ADT Resources\\Graphic Symbols\\Equipment;
T:\\030_CADD Resources\\ADT Resources\\Graphic Symbols\\Mechanical;
T:\\030_CADD Resources\\ADT Resources\\Graphic Symbols\\Plumbing"
    ) ;_ end of strcat
 ) ;_ end of setq
 (vlax-put-property tabnameObject 'SupportPath thePath)
 (princ)
) ;_ end of defun

Posted

WOW!!! Thank you! After about a week of trying your post worked beautifully.

 

One last question: How may I call AND run the lisp from an office mnu file?

 

(That is my last piece of the puzzle.)

Posted

If you're asking for a macro, save the code as AddSupportPaths.lsp somewhere in your support path, then use this as the macro

(if (not c:asp)(load "AddSupportPaths"));asp;

Posted

hey this is great we just updated 8 copies of autocad and we find copying arg files and other stuff can be difficult we have multiple users on pc's and must set for each new user but just setting all our search paths printers settings etc in one go will make our life so much easier will try tommorrow !!

 

Sometimes our cad guys also screw stuff up so the more press a button to fix the better.

Posted

THANK YOU SO MUCH! This works perfectly!

 

Sincerely,

Timothy

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...