
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to have a form drive the overall assembly, which calls a rule to push all the input values to the sub assemblies and sub components. the aim is to only push values if the parameter exists in the sub component, so there aren't a bunch of unused values in each part. The below is not pushing values, and I do not know why.
Dim openDoc As Document
openDoc = Thisapplication.ActiveDocument
Dim oDoc As Inventor.Document
For Each oDoc In openDoc.AllReferencedDocuments
If oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
Dim oPartDoc As PartDocument = TryCast(oDoc, PartDocument)
Dim oCompdef As PartComponentDefinition = oPartDoc.ComponentDefinition
Dim FNamePos As Long
FNamePos = InStrRev(oPartDoc.FullFileName, "\", -1)
Dim docFName As String
docFName = Strings.Right(oPartDoc.FullFileName, Len(oPartDoc.FullFileName) - FNamePos)
Dim oParam As Inventor.Parameter
PropList = new string(){"DuctLength","DuctWallThickness","DuctWidth","DuctHeight","VesselCeilingToInletDuctFloor","InletDuctCeilingToPenthouseFloor","DisperserDiameterAtConeExit","SupportTubeOD","VesselDischargeDiameter","VesselCylindricalHeight","VesselCylindricalDiameter","OutletDuctDiameter"}
For Each oParam In oPartDoc.ComponentDefinition.Parameters
For Each oProp in PropList
If oParam.Name = oProp Then
Parameter(oDoc,oProp)=Parameter(oProp)
End If
Next
Next
oPartDoc.Update()
End If
Next
openDoc.Rebuild()
Solved! Go to Solution.