Message 1 of 2
Export Parameter - Text generated from iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone!
I am using Inventor 2022 and I have an iLogic code here that creates a flat pattern of any sheet metal part and then creates the bounding box and fill in the information on the custom iProperty for Width and Height of the plate. (see below). My question is how do I export the Height and Width of the custom iProperty as a parameter so that the BOM utility that we have can be populated with the same information? As of now it does not populate because there is no parameter called Height and Width and no tick box to check.
Is this even possible to link without checking the tick box in the parameters table?
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kPartDocumentObject Then MsgBox("A Part Document must be active for this rule to work. Exiting.", vbCritical, "") Exit Sub End If Dim oPDoc As PartDocument = ThisDoc.Document Dim oSMDef As SheetMetalComponentDefinition = Nothing If TypeOf oPDoc.ComponentDefinition Is SheetMetalComponentDefinition Then oSMDef = oPDoc.ComponentDefinition Else Try oPDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" oSMDef = oPDoc.ComponentDefinition Catch MsgBox("Error converting non-sheet metal part to sheet metal.", vbCritical, "") Exit Sub End Try End If Dim oFP As FlatPattern = Nothing If oSMDef.HasFlatPattern Then oFP = oSMDef.FlatPattern Else Try ThisApplication.ScreenUpdating = False oSMDef.Unfold oSMDef.FlatPattern.ExitEdit ThisApplication.ScreenUpdating = True oFP = oSMDef.FlatPattern Catch MsgBox("Error Unfolding part to craete FlatPattern.", vbCritical, "") Exit Sub End Try End If Dim extents_length As String = Round(SheetMetal.FlatExtentsLength, 3) Dim extents_width As String = Round(SheetMetal.FlatExtentsWidth, 3) iProperties.Value("Custom", "Height") = extents_length iProperties.Value("Custom", "Width") = extents_width