Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: mat_hijs

Hi @mat_hijs.  What you are asking for may simply not be possible.  And if it is possible, it will most likely require a lot of complicated code, and a lot of processing.  The there are only two associations between balloons and what they reference.  They have the BalloonValueSets, but each BalloonValueSet may only lead to a row of the BOM, not a specific component, when there is more than one component being represented by that row.  The other route is through what the balloon is actually physically attached to.  You can start down that path by first checking the Balloon.Attached property value, and if True, looking into the Balloon.Leader, then Leader.HasRootNode, then get the last node in the leader, and check its LeaderNode.AttachedEntity property, to get the GeometryIntent object.  Check its GeometryIntent.IntentType to see if it is the 'kGeometryIntent' variation of the IntentTypeEnum.  If it is, then get its GeometryIntent.Geometry to a variable (as an Object).  This can be multiple different types of objects, which is why its Type is just Object, instead of something more specific.  Because of this, a whole other block of code is needed that tests what Type it actually is, then reacts differently to the different Types.  In order for you to find out if one specific component has a balloon attached to it, you would have to loop through each sheet, because the balloons belong to the sheet.  Then you would have to test each view on each sheet, because we will need to use the DrawingView.DrawingCurves(oComponent) property as a means of getting the view geometry associated with that one component in that one view.  Then loop through each DrawingCurve in that DrawingCurvesEnumerator that you get from the DrawingCurves property (after checking if its Count = 0).  Check if the object you got from the GeometryIntent.Geometry property is that DrawingCurve from this loop.  If so, then you will know that component has a Balloon attached to it in at least one view, on at least one sheet.  Whew...:grinning_face_with_sweat:

Wesley Crihfield

EESignature

(Not an Autodesk Employee)