How to find out using AutoCAD command line, if a DWG file is having Portrait or Landscape orientation

How to find out using AutoCAD command line, if a DWG file is having Portrait or Landscape orientation

Anonymous
Not applicable
1,231 Views
5 Replies
Message 1 of 6

How to find out using AutoCAD command line, if a DWG file is having Portrait or Landscape orientation

Anonymous
Not applicable

We are trying to generate a pdf with AutoCAD Command line , it works well. but we are having issues with orientation in the generated PDF.

 

We can either set it to Portrait or Landscape in the script file. There is no option as such to keep this setting dynamic.

 

If we set it to portrait …all drawing are adjusted to portrait mode and vice versa.

 

So if there can be any way to find out the orientation of the DWG file already, we can update the script accordingly and run the batch file to generate the pdf.

 

Any help, best practice is appreciated.  Thanks a lot. if there any questions please ask me.

0 Likes
1,232 Views
5 Replies
Replies (5)
Message 2 of 6

rkmcswain
Mentor
Mentor

The -Plot command should be able to do it

0 Likes
Message 3 of 6

Anonymous
Not applicable

As i am not an expert in AutoCAD , Please let me know what should be exact command to run in a batch file to find the orientation of a AutoCAD DWG file?

0 Likes
Message 4 of 6

JTBWorld
Advisor
Advisor

There is no out-of-the-box command for that. You need to create it for example with AutoLISP. We offer custom development services if interested. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 5 of 6

Valentin_CAD
Mentor
Mentor

The orientation for each "Paper Space" drawing Tab in each drawing can be managed, verified or modified using the File > "Page Setup Manager" (in regards to Landscape or Portrait drawing orientation).  Once every drawing in the batch is verified, a PDF of every sheet can be created using File > Publish .



Select the "Mark as Solution" if my post solves your issue or answers your question.

Seleccione "Marcar como solución" si mi publicación resuelve o responde a su pregunta.


Emilio Valentin

0 Likes
Message 6 of 6

Anonymous
Not applicable

Thanks for your suggestion...But i am looking for some automation through scripts/command line, so that i can find out the orientation or page size and pass it out to a variable in a program or at least put this info in to a text file so that the program can read it from there.

0 Likes