cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
RobDev
Contributor

Create drawing of external PDF

Hi all,

 

I'm struggling to work out even where to start with importing a PDF to a layout using the API. I found an older thread (CREATE A DRAWING FROM A FILE? - Graphisoft Community) asking a similar question but no had luck in finding anything useful.

 

If anyone has any pointers or an example they could provide, please let me know.

 

Thanks,

Rob

1 Solution

Accepted Solutions
Tamas Polyak
Graphisoft
Graphisoft

Hi Rob,

Unfortunately there is no PDF importer that can be called from the API.

It's still valid what Ákos wrote in the linked post. You can create an empty drawing and add elements to it via the API. For the input to be the PDF file, you'd need a library of functions that can extract drawing primitives from the PDF that then can be added as primitives to the drawing.

You can find the skeleton code for it in the example Element_Test.

 

Best regards,
Tamás

Go to post

4 Replies 4

Hi Rob,

 

It's surprising that there's no API call to do it, but it seems so.
@Akos Somorjai you answered in the mentioned post about different approaches. Do you have any suggestion on how to approach linking PDF's via the API?

 

Best regards,
Bernd

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com
Tamas Polyak
Graphisoft
Graphisoft

Hi!
I'm looking into it, if there's a way with PDFs.

 

Regards,

Tamás

RobDev
Contributor

Hi Tamás,

 

Thanks for giving it a look, let me know if you find anything - I'm sure I'm not the only one needing something like this 😁

 

Thanks,

Rob

Tamas Polyak
Graphisoft
Graphisoft

Hi Rob,

Unfortunately there is no PDF importer that can be called from the API.

It's still valid what Ákos wrote in the linked post. You can create an empty drawing and add elements to it via the API. For the input to be the PDF file, you'd need a library of functions that can extract drawing primitives from the PDF that then can be added as primitives to the drawing.

You can find the skeleton code for it in the example Element_Test.

 

Best regards,
Tamás

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!