Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Ok. I give up.
This should be simple.
Just need to flag the sheetmetal "Thickness" parameter for export, then create a custom iProp called "Thickness" and assign its value to sheetmetal Thickness.
What am I doing wrong here?
Keep getting this message :
Error in rule: ASY Total Part QTY, in document: 82387-070.iam
Public member 'Parameter' on type 'SheetMetalComponentDefinition' not found.
'Set a reference to the primary ComponentDefinition of the row Dim oCompDef As ComponentDefinition = oBOMRowPO.ComponentDefinitions.Item(1) 'Check if the component is supressed 'If oCompDef.Suppressed = False Then 'get the full filename associated to the component in the row. ex: c:\temp\part1.ipt Dim CompFullDocumentName As String = oCompDef.Document.FullDocumentName Dim CompFileNameOnly As String 'get the location of the last backslash Dim index As Integer = CompFullDocumentName.lastindexof("\") 'get the filename only from the full filename CompFileNameOnly = CompFullDocumentName.substring(index+1) 'MessageBox.Show(CompFileNameOnly) 'get the Qty value in the current row Dim Qty As String = oBOMRowPO.TotalQuantity 'check to see if the component is a library part, cc part or read only. Dim IsLibCCReadonly As Boolean = LibCCReadonlyChecker(CompFullDocumentName) 'if the file is NOT a library part, cc part or read only. If IsLibCCReadonly = False Then 'set following custom iproperty to equal the QTY from the row iProperties.Value(CompFileNameOnly, "Custom", "TotalPartQty") = Qty ' Look at the sheet metal parts only 'If oDoc.DocumentSubType.DocumentSubTypeID <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then Continue For Dim oParam As Inventor.Parameter = oCompDef.Parameters.Item("Thickness") If oParam IsNot Nothing Then 'Flag to export oParam.ExposedAsProperty = True
'Problem happens is HERE ....... iProperties.Value(CompFileNameOnly, "Custom", "Thickness") = oCompDef.Parameter("Thickness")
End If
Thank you guys
Solved! Go to Solution.