Message 1 of 2
ilogic and custom iproperties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a rule to add a custom iPropteries "small" if either width or length of a part is > 1.5 and < 6.
iLogicVb.UpdateWhenDone = True Dim pLength As Decimal = width Dim pWidth As Decimal = length 'Dim pLength As Decimal = Measure.ExtentsLength'Dim pWidth As Decimal = Measure.ExtentsLength 'define custom property collection'oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")'look at each property in the collection'For Each oCustProp In oCustomPropertySet'check for a property name that you don't want to delete'If oCustProp.Name = "small" Then'delete the custom iProperty'oCustProp.Delete'Else'End If'Next If pLength > 1.5 And pLength < 6 Then iProperties.Value("Custom", "small") = "yes" Else If pWidth > 1.5 And pLength < 6 Then iProperties.Value("Custom", "small") = "yes" Else iProperties.Value("Custom", "small") = "no" End If RuleParametersOutput() InventorVb.DocumentUpdate()
It doesn't work if I change the rule to
Dim pLength As Decimal = Measure.ExtentsLength Dim pWidth As Decimal = Measure.ExtentsLength
I have to run rule after change the parameter to have iProperties updated. Is there a way to update iProperties without run or regenerate the rule?
Thanks,
Tuan