creating 3d pdf with API

creating 3d pdf with API

KarlR.J.Wehr
Enthusiast Enthusiast
3,085 Views
7 Replies
Message 1 of 8

creating 3d pdf with API

KarlR.J.Wehr
Enthusiast
Enthusiast

Hi,

 

I'm trying to create a 3d pdf with Inventor 2017 API.

 

With the sample code provided by the Inventor API Help ("Export to 3D PDF API Sample") I am able to create a 3d pdf for a part file (ipt) but the code fails for an assembly document. Running the code for an assembly document only creates an empty 3d pdf.

 

So, what is missing to deal with assemblies?

 

I'll be greatful for any help provided...

 

Karl

0 Likes
Accepted solutions (1)
3,086 Views
7 Replies
Replies (7)
Message 2 of 8

LukeDavenport
Collaborator
Collaborator
Accepted solution
Message 3 of 8

KarlR.J.Wehr
Enthusiast
Enthusiast

Hi Lunk,

thanks for your answer, its working now...

Karl

0 Likes
Message 4 of 8

LukeDavenport
Collaborator
Collaborator

No worries Karl,

Luke

0 Likes
Message 5 of 8

tcp_wegener
Contributor
Contributor
 'Publish document.
    Call oPDFConvertor3D.Publish(oDocument, oOptions)
    

I copied your sample. but I miss the 'oPDFConvertor3D.Publish" method.

"Publish" is not a member of the Automation property, it's just an object.

Do I have to use reflection to invoke the "Publish" method?

0 Likes
Message 6 of 8

Anonymous
Not applicable

Hi Thomas,

It could be that you are not using Inventor 2017, or you are using a previous Inventor object library by mistake?

Luke

0 Likes
Message 7 of 8

tcp_wegener
Contributor
Contributor

Hi Luke,

 

hmm I'm using Inventor 2017. But I don't understand how you can cal a method which isn't existing? The Automation proprty is of "object" and this one don't hhave any method like "publish". It needs another type which have this method, so I can cast it to this type and call the function publish on it.

 

How do you can manage this issue?

 

Thomas

0 Likes
Message 8 of 8

tcp_wegener
Contributor
Contributor

Hi Luke,

 

sorry it was my fault. I have too use the late binding stuff.
There is a special keyword in C# for this (instead of using var or object), so:

 

dynamic oPDFConvertor3D = oPDFAddIn.Automation;

 

is working 🙂

 

Thomas

0 Likes