Hello!
I was just wondering if anyone knows how to return to Folded part after creation of flat pattern using API code?
The code I have is straight forward, it saves dxf of the flat pattern if its exists, if flat pattern doesn`t exist it creates it and leaves the active ipt part as flat pattern on the screen.
Private Sub SaveDXF() 'Dim _inventorApplication As Inventor.Application ' get file name Dim pName As String pName = m_inventorApplication.ActiveDocument.DisplayName MsgBox(pName) ' Get the active document. This assumes it is a part document. Dim oDoc As PartDocument oDoc = m_inventorApplication.ActiveDocument ' Save the current silent operation state. Dim silentState As Boolean silentState = m_inventorApplication.SilentOperation ' Get the DataIO object. Dim oDataIO As DataIO oDataIO = oDoc.ComponentDefinition.DataIO ' Build the string that defines the format of the DXF file. Dim sOut As String sOut = "FLAT PATTERN DXF?AcadVersion=R12&InvisibleLayers=IV_UNCONSUMEND_SKETCHES;IV_ALTREP_BACK;IV_ALTREP_FRONT;IV_ARC_CENTERS;IV_TOOL_CENTER_DOWN;IV_TOOL_CENTER;IV_TANGENT;IV_BEND;IV_BEND_DOWN" ' Create the DXF file. oDataIO.WriteDataToFile(sOut, FolderPath & "\" & pName & ".dxf") oDoc.Update() End Sub
after running the code above
So my question is how to perform GOTO FOLDED PART command through API? So its shows folded part ?
Thank you!
Solved! Go to Solution.
Solved by humbertogo. Go to Solution.
with the FlatPattern.ExitEdit Method
something like
osheetMetalCompDef.Unfold() 'Go to flat pattern
osheetMetalCompDef.FlatPattern.ExitEdit() 'Go to folded part