Using a lsp to set Plot Style Table Search Paths

Using a lsp to set Plot Style Table Search Paths

Anonymous
Not applicable
2,100 Views
4 Replies
Message 1 of 5

Using a lsp to set Plot Style Table Search Paths

Anonymous
Not applicable

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

0 Likes
Accepted solutions (1)
2,101 Views
4 Replies
Replies (4)
Message 2 of 5

paullimapa
Mentor
Mentor
0 Likes
Message 3 of 5

hmsilva
Mentor
Mentor
Accepted solution

@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
Not applicable
Thank you, hmsilva! It works perfectly now.
0 Likes
Message 5 of 5

hmsilva
Mentor
Mentor
You're welcome, Jeffery
Glad I could help

Henrique

EESignature

0 Likes