Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Export to PDF command line help.

gobluejd
Advocate

Export to PDF command line help.

gobluejd
Advocate
Advocate

hmsilva Has helped me get a auto PDF generator to work in windows.  The lisp replaces the qsave command and when you type qsave, it auto generates to a specific location and works really good.  I wanted to try on the MAC.  You can see whole convo here.  

 

More specifically he stared helping on the MAC but he is not a mac user.  That convo starts here.

 

I am pretty sure it can be come but need some assistance and hopefully someone can help out.

 

Basically I want to see I can create a PDF completely from the command line and use in the aucaddoc.lsp which I have confirmed loads and works.

 

 

 

 

0 Me gusta
Responder
Soluciones aceptadas (1)
4.638 Vistas
60 Respuestas
Respuestas (60)

maxim_k
Consultant
Consultant
Hi @gobluejd,

Where did you put QS.lsp?
>>>>>When I load the QS.lsp and run it still says unknown command.
How do you load it?
I don't see it on your screenshot with APPLOAD dialog window.

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

Oh that may be problem.  I have it loading from my Dropbox. 


Also - I have to contact an admin - I get no notifications for PM's or thread replies.  Email correct and settings correct.

0 Me gusta

gobluejd
Advocate
Advocate

Do I need to put it somewhere specific.  I read thru the thread and do not see a mention of where it needs to reside.  I tried just putting on desktop and still get unknown command.

0 Me gusta

maxim_k
Consultant
Consultant
You can put it even on Desktop.
When you use APPLOAD command you should see a message at the command prompt that QS.lsp successfully loaded.
Do you see it?
AutoCAD may also ask you about trusted location, you should select “Always load”.
Please describe how do you use APPLOAD command to load LSP.

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

FYI - I fixed my notifications. The master was set to off in profile.

 

I get the following.  I click ADD and get syntax error.  See attached. Same happens when on Desktop.

 

Screen Shot 2021-02-08 at 8.51.37 AM.pngScreen Shot 2021-02-08 at 8.51.55 AM.png

0 Me gusta

maxim_k
Consultant
Consultant
>>>> I click ADD and get syntax error.
Looks like you edited LSP incorrectly. And AutoCAD doesn't load it.
Attach LSP - I'll look at it little bit later.

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

Thank you.  See attached.

 

 

0 Me gusta

maxim_k
Consultant
Consultant

Try attached.

 

BTW, this LSP doesn't save drawing after exporting to PDF. Do you want that?

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

Yes if that is possible.

0 Me gusta

gobluejd
Advocate
Advocate

It seems like it will work.  Path incorrect.  However from what I can see in the LSP it looks ok.  Here is the path.

 

/Users/jeffreydickerson/Dropbox/Drawings/PDF

 

 

0 Me gusta

maxim_k
Consultant
Consultant

I replaced the path.

See attached.


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

It appears it is asking for a Page Setup Name.  I am trying to move from AUTOCAD on WIN to MAC.  So my templates are from WINDOWS AUTOCAD.  Before even using the QS lsp.  I get warning that my PCS can not be used.  I think this might be why it is asking me for Page Setup Name when initiating the QS?  I am not sure.  If I hit OK and select my printer, it will print to printer.

 

Here are some Screens.

Screen Shot 2021-02-08 at 2.15.13 PM.png

Screen Shot 2021-02-08 at 2.15.22 PM.png

Screen Shot 2021-02-08 at 2.15.31 PM.png

   

 

0 Me gusta

maxim_k
Consultant
Consultant
It asks for printer name.
It assumes current page setup.
What AutoCAD version are you using?
Can you share one of your drawings, I'll try to look what's going wrong.

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

 I am using R.47.M.104 AutoCad for MAC.  I have attached a template in DWG that I use and is common.

 

https://www.dropbox.com/s/wgi4xbp4yhbho2e/maxim_k.dwg?dl=0

0 Me gusta

maxim_k
Consultant
Consultant
Is it 2021?

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

Yes

0 Me gusta

maxim_k
Consultant
Consultant

Another attempt - see attached.


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

Almost there!!!  2 things - It is not printing correctly.  See attached.  The QS PDF does not have correct print.  I also attached what it should look like.  Also it appears to not be able to save.  Is that possible?  Again thank you for your time, it is greatly appreciated.  I finally want to move completely to the MAC side.  

Screen Shot 2021-02-09 at 7.47.26 AM.png

Screen Shot 2021-02-09 at 7.49.25 AM.png

  

 

0 Me gusta

maxim_k
Consultant
Consultant

>>>>It is not printing correctly.

You need to edit Page Setup in template drawing (or in each drawing you already have):

2021-02-09_18-52-42.png

 

1 - select "AutoCAD PDF (General documentation).pc3 printer

2 - activate "Center plot" option as you are using "Window" option for "What to Print"

I attached your template with modifications.

 

>>>>Also it appears to not be able to save.  Is that possible?

Yes, it is. I uncommented 

(command "_.qsave")
in QS.LSP and now it saves drawing after export to PDF.

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Me gusta

gobluejd
Advocate
Advocate

Thank you very much it works!!!  However I see a possible issue.  I have over 3000 dwgs that have been created in WIN Version (page setup).  So every time I save one of those with the QS I will get the incorrect PDF printed?  Is there a way around this?  Obviously it is not an issue for newly created as I can update the TEMPLATE.  I looked to see if it can use the last page setup, but do not see.  I am not sure I want to have to change all the drawings. Is there a way around this?

 

Again thank you for your valuable time.

0 Me gusta