Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using a lsp to set Plot Style Table Search Paths

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
1923 Views, 4 Replies

Using a lsp to set Plot Style Table Search Paths

Hi everybody,

 

I am currently working on a lisp routine that sets file paths under the options. It works (for the most part) but I've run in to some snags, the main issue right now being this code:

 

(setenv "PrinterStyleSheetDir" "C:\\ACAD\\Plotting\\Plot Styles; C:\\ACAD\\CMN-2014\\Plot Styles")

 

We have our own office plot style that we use, but we also have to accommodate some clients that require their own plot styles (which is why there are two paths there). We use a .ctb while the client uses a .stb.

 

The issue I'm encountering is that when trying to plot a .dwg that uses the client's .stb, the plot window shows that the .stb is missing (which is located under the second path). However, once opening the Options and hitting Apply, AutoCAD now correctly sees the .stb. I've narrowed the cause of this issue down to the above code in our lisp. When manually applying the file paths, ACAD has no problem finding both the .ctb's that we use and the .stb that we need for the client, but when the code is used to apply the paths, ACAD suddenly doesn't see the .stb. This file is being run through the acaddoc.lsp

 

Any ideas why this is? Is there a different way to approach this issue (while still using lisp)? Any help is greatly appreciated

4 REPLIES 4
Message 2 of 5
paullimapa
in reply to: Anonymous
Message 3 of 5
hmsilva
in reply to: Anonymous


@Anonymous wrote:

 

(setenv "PrinterStyleSheetDir" "C:\\ACAD\\Plotting\\Plot Styles; C:\\ACAD\\CMN-2014\\Plot Styles")

 


Hi Jeffery,

 

using AutoCAD 2012 and plus, it works on this side, but you must remove the space between ; and C

Try

(setenv "PrinterStyleSheetDir" "C:\\ACAD\\Plotting\\Plot Styles;C:\\ACAD\\CMN-2014\\Plot Styles")

 

HTH

Henrique

EESignature

Message 4 of 5
Anonymous
in reply to: hmsilva

Thank you, hmsilva! It works perfectly now.
Message 5 of 5
hmsilva
in reply to: Anonymous

You're welcome, Jeffery
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

State of Sustainability Webinar


AutoCAD Inside the Factory