Creating scenes in presentation file and linking them to view representations

Creating scenes in presentation file and linking them to view representations

Anonymous
Not applicable
1,391 Views
7 Replies
Message 1 of 8

Creating scenes in presentation file and linking them to view representations

Anonymous
Not applicable

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

0 Likes
1,392 Views
7 Replies
Replies (7)
Message 2 of 8

YuhanZhang
Autodesk
Autodesk

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.

0 Likes
Message 3 of 8

Anonymous
Not applicable

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

0 Likes
Message 4 of 8

virendra.patilT8L32
Explorer
Explorer

Hi

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

Thanks & Regards,

Viren

0 Likes
Message 5 of 8

virendrapatil575
Community Visitor
Community Visitor

Hi,

  can you please update on Presentation API.

 

I am stuck at same.

Thanks in advance

0 Likes
Message 6 of 8

YuhanZhang
Autodesk
Autodesk

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.

0 Likes
Message 7 of 8

virendrapatil575
Community Visitor
Community Visitor

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.

0 Likes
Message 8 of 8

skyngu
Collaborator
Collaborator

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
0 Likes