Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

-PDFimport as block automation

Anonymous

-PDFimport as block automation

Anonymous
Not applicable

Hi all,

I'm using python to automate insertions of PDFs into DWGs through the PDFimport functionality.

PDFimport dialogue box allows you to check the "import as a block" setting which prevents autocad from creating layers for the imported PDF.

 

Is there a way to pass this setting as an argument to the -PDFIMPORT command? as I'm using the SendCommand and Autocad APIs.

0 Likes
Reply
Accepted solutions (1)
734 Views
2 Replies
Replies (2)

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

>> check the "import as a block" setting which prevents

>> autocad from creating layers

Sorry, incorrect. Importing it as block or not as block does not make a difference for importing the layers into AutoCAD.

There you can see the 2 different options, one for layer and the other for "as block"

 

20181106_093917.png

 

>> Is there a way to pass this setting as an argument to the

>> -PDFIMPORT command? 

For the "as block" option you can first set the variable PDFIMPORTMODE (>>>details<<<) to match your needs, for adding layers or not you can preset the variable PDFIMPORTLAYERS (>>>details<<<).

 

>> I'm using the SendCommand

I would avoid that as you don't get any errors or confirmation if the command succeeded or not.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

Anonymous
Not applicable

Thank you indefinitely, that was really helpful. What do you suggest for automation instead of SendCommand

I'm using Python.

 

Regards,

Walid

0 Likes