Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear members,
I had this rule like under, but it does not work since the last update. Can someone help me
This error is given
Error in rule: bevestigingsmaterialen-OFF, in document: C152.iam
Object reference not set to an instance of an object.
Dim assemblyDef As AssemblyComponentDefinition = ThisDoc.Document.ComponentDefinition Dim occ As Inventor.ComponentOccurrence For Each occ In assemblyDef.Occurrences.AllLeafOccurrences Dim refDoc As PartDocument = occ.Definition.Document Dim customPropSet As PropertySet customPropSet = refDoc.PropertySets.Item("Inventor User Defined Properties") Dim weightProp As Inventor.Property weightProp = Nothing Try weightProp = customPropSet.Item("art") Catch ex As Exception End Try weightVal = weightProp.Value If weightVal = "BEV" Then occ.Visible = False Else occ.Visible = True End If Next
Solved! Go to Solution.