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

Creating scenes in presentation file and linking them to view representations

Hi all,

 

I have a pretty complicated assembly that I am creating assembly documents for and I have the assembly steps set up in different view representations in my assembly. I want to create a presentation file (.ipn) in the same directory as the assembly and then create a scene that is linked to each view representation in the assembly. I will go in an manually make the tweaks the the scenes and take whatever snapshots I want. After this I want to create an assembly drawing in the same directory as the presentation file and then create a sheet for every scene in the presentation file. After the sheets are created, I want to go in and add a base view for every snapshot in the scene to the scene's respective sheet.

 

 The only thing that is holding me back is:

  1. Creating a new scene in a presentation file and pointing it to a design representation in an assembly

I have searched the API docs but I haven't found anything regarding this.

 

I will post the entire code if anybody could help me out with the above step.

 

Thanks for your time.

 

Cheers,

Michael

YuhanZhang
in reply to: Anonymous

Hi Michael,

 

We currently don't have  full APIs support for Presentation documents, but as a workaround you can use the code in below post to create presentation:

 

https://forums.autodesk.com/t5/inventor-customization/api-insert-the-assembly-into-presentation-inve...

 

But you may still need more APIs to accomplish your purpose. You can vote the idea for get the Presentation APIs:

 

https://forums.autodesk.com/t5/inventor-ideas/ipn-presentations-ilogic-capable/idi-p/8126265?advance...

 

You can also add comment to it to help us to evaluate it.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Anonymous
in reply to: YuhanZhang

Hi Rocky,

 

Thank you for getting back to me. Once I implement the work around I will post my code here. Hopefully we can get ilogic support for presentation files soon.

 

Cheers,

Michael

virendra.patilT8L32
in reply to: Anonymous

Hi

Did you got the solution? If yes please share with me. I also stuck on same point.

Thanks & Regards,

Viren

Hi,

  can you please update on Presentation API.

 

I am stuck at same.

Thanks in advance

Can you try if the below VBA code workaround works for you?
____________________________________
Sub InsertToPrestention()

Dim oCM As CommandManager
Set oCM = ThisApplication.CommandManager
oCM.ClearPrivateEvents

Dim sFile As String
sFile = "C:\Temp\Assembly1.iam"

oCM.PostPrivateEvent kFileNameEvent, sFile


Dim oDoc As PresentationDocument
Set oDoc = ThisApplication.Documents.Add(kPresentationDocumentObject)

End Sub
____________________________________



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Up to this is ok. But adding scene into presentation file is challenge. If you have any code to add scene then please share with me.

Thanks.

skyngu
in reply to: Anonymous

I tried to access browsernode. but it doesnt work neither. I can not copy scene and paste into presentation file.

 

Dim oCopyControlDef As ControlDefinition
Set oCopyControlDef = oCM.ControlDefinitions.Item("AppCopyCmd")
Call oCopyControlDef.Execute

 

EDIT: I found out the way to copy and paste.

Autodesk Inventor Professional 2019