Parameter "Consumed by" Property
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
is there a way to directly access the contents of the "Consumed by" field shown in the Parameters Dialog of Inventor through the API?
I implemented a function* that finds the information indirectly by searching the PartComponentDefinition or AssemblyComponentDefinition of the document in question, but that function is relatively slow when we call it for all Parameters of a document, so I was wondering if there is a Property I overlooked (perhaps a hidden Property or Attribute?) that would directly return the information.
The existing solution works all right, but it's a performance bottleneck - the "Consumed by" field takes much longer to query than all the other properties of the Parameters combined. So it would be great if there is a simple shortcut to directly get the "Consumed by" string that is shown in the Parameters dlg without searching through the multiple different collections in the ComponentDefinition to obtain the information manually.
*The function I'm using iterates the .Dependents of the Parameter object, the Sketches of the Part or Assembly (to compare if one of the Parameters used by the Dimensions equals the search parameter), the Features (comparing if a FeatureDimension uses the search Parameter) and the WorkPoints, WorkAxes and WorkPlanes (checking if one of the items in the DrivenBy collection references our Parameter); when called for an Assembly, we also check the different types of Constraints to find out if its Distance/Offset/Angle property references our Parameter and the OccurrencePatterns to find out if AngleOffset or ElementCount (for CircularOccurrencePattern) or the RowCount/RowOffset/ColumnCount/ColumnOffset (for RectangularOccurrencePattern) is our Parameter.