Script help because I can't remember AutoLISP anymore

Script help because I can't remember AutoLISP anymore

SOrman1
Explorer Explorer
546 Views
6 Replies
Message 1 of 7

Script help because I can't remember AutoLISP anymore

SOrman1
Explorer
Explorer

I am trying to put together a Script to create a set of PDFs, but when it does, they are saved with the name JT1 or JT2 or JT3 as I don't kjnow how to get the drawing name to appear in front of that text, but it also sends the newly created PDFs to the last folder I saved a PDF to. I would prefer it send it to "PLOTTOFILEPATH <"C:\USERS\USERNAME\DESKTOP\PDFs">. In my case, the PDFs folder on my desktop is the final destination. It just doesn't go there.

 

My Script:

;Plot JT1-JT3
-PLOT
Y

P - AutoCAD PDF.pc3
ARCH expand D (36.00 x 24.00 Inches)
Inches
Landscape
No
View
JT1
1=1
Center
yes
C-Grayscale.ctb
Yes
Yes
no
no
JT1
Yes
Yes

Y

P - AutoCAD PDF.pc3
ARCH expand D (36.00 x 24.00 Inches)
Inches
Landscape
No
View
JT2
1=1
Center
yes
C-Grayscale.ctb
Yes
Yes
no
no
JT2
Yes
Yes

Y

P - AutoCAD PDF.pc3
ARCH expand D (36.00 x 24.00 Inches)
Inches
Landscape
No
View
JT3
1=1
Center
yes
C-Grayscale.ctb
Yes
Yes
no
no
JT3
Yes
Yes

 

Any and all suggestions would be helpful. 

Thank you

HullDrafter

0 Likes
Accepted solutions (1)
547 Views
6 Replies
Replies (6)
Message 2 of 7

pendean
Community Legend
Community Legend
May I ask why you are not using PUBLISH command to do all of this?
0 Likes
Message 3 of 7

paullimapa
Mentor
Mentor
Accepted solution

replace where you have JT1 with this:

(strcat(getvar"PLOTTOFILEPATH")(vl-filename-base(getvar"dwgname"))"JT1")

JT2 with this:

(strcat(getvar"PLOTTOFILEPATH")(vl-filename-base(getvar"dwgname"))"JT2")

JT3 with this:

(strcat(getvar"PLOTTOFILEPATH")(vl-filename-base(getvar"dwgname"))"JT3")

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 4 of 7

SOrman1
Explorer
Explorer
When I tried to use publish, it worked with Layouts and we have multiple
views on a single layout. Besides, this is fun to figure out.
0 Likes
Message 5 of 7

SOrman1
Explorer
Explorer

Trust me, this works great, but it had one hick-up. It saved the PDFs to my Desktop not to the PDF folder. I can live with where they are, but, any suggestions to get it into the last folder?

0 Likes
Message 6 of 7

paullimapa
Mentor
Mentor

strange...perhaps your PLOTTOFILEPATH doesn't point to your Dekstop\PDFs folder

to check enter PLOTTOFILEPATH at the command prompt and see if it returns:

<"C:\USERS\USERNAME\DESKTOP\PDFs\">

or

<"C:\USERS\USERNAME\DESKTOP\">

If all else fails enter the complete path within the script file like this:

(strcat"C:\\USERS\\USERNAME\\DESKTOP\\PDFs\\"(vl-filename-base(getvar"dwgname"))"JT1")

JT2 with this:

(strcat"C:\\USERS\\USERNAME\\DESKTOP\\PDFs\\"(vl-filename-base(getvar"dwgname"))"JT2")

JT3 with this:

(strcat"C:\\USERS\\USERNAME\\DESKTOP\\PDFs\\"(vl-filename-base(getvar"dwgname"))"JT3")


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 7

SOrman1
Explorer
Explorer

For whatever reason, it just won't go to that last folder. Thank you for your assistance. I can work with them as they land on the desktop

0 Likes