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

Script help because I can't remember AutoLISP anymore

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
SOrman1
425 Views, 6 Replies

Script help because I can't remember AutoLISP anymore

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

Tags (1)
6 REPLIES 6
Message 2 of 7
pendean
in reply to: SOrman1

May I ask why you are not using PUBLISH command to do all of this?
Message 3 of 7
paullimapa
in reply to: SOrman1

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
in reply to: pendean

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.
Message 5 of 7
SOrman1
in reply to: paullimapa

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?

Message 6 of 7
paullimapa
in reply to: SOrman1

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
Message 7 of 7
SOrman1
in reply to: paullimapa

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

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report