Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a rule to set the dimensions of my component into custom iProperties, is there a way to make it so the rule is triggered when i enter a new component?
the current code is:
Sub Main() Dim customPropertySet As Inventor.PropertySet Dim prop As Inventor.Property Dim propertyName As String Dim propertyValue As String customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties") ' Set custom property for d0 propertyName = "d0" propertyValue = Measure.PreciseExtentsHeight Try prop = customPropertySet.Item(propertyName) Catch ' Assume error means not found customPropertySet.Add("", propertyName) End Try iProperties.Value("Custom", propertyName) = propertyValue ' Set custom property for d1 propertyName = "d1" propertyValue = Measure.PreciseExtentsWidth Try prop = customPropertySet.Item(propertyName) Catch ' Assume error means not found customPropertySet.Add("", propertyName) End Try iProperties.Value("Custom", propertyName) = propertyValue ' Set custom property for d2 propertyName = "d2" propertyValue = Measure.PreciseExtentsLength Try prop = customPropertySet.Item(propertyName) Catch ' Assume error means not found customPropertySet.Add("", propertyName) End Try iProperties.Value("Custom", propertyName) = propertyValue End Sub
Solved! Go to Solution.