Get Drawing Curve of a hidden component

Get Drawing Curve of a hidden component

Saikiran_arakeri
Enthusiast Enthusiast
328 Views
4 Replies
Message 1 of 5

Get Drawing Curve of a hidden component

Saikiran_arakeri
Enthusiast
Enthusiast

I am trying to get the drawing curves of a hidden component from a Drawing document. I want the drawing curve to place a balloon. @JelteDeJong.

Here two identical parts are placed in a view overlapping each other. The Api tends to find the drawing curve of the component that is visible and balloon it but skip the part which isn't visible.

0 Likes
329 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Hi  @Saikiran_arakeri.  Just thinking out loud here, but if there is no geometry within the drawing view for the component, then there will not be any geometry to attach the balloon to.  You can use the DrawingView.SetIncludeStatus() method to 'include' some geometry in the view, which automatially set its 'visibility' status to True.  Once the geometry is 'included' you can create a GeometryIntent from it to use for placing your Balloon.  Then you might be able to set the 'visibility' status of that geometry back off, if you want to, after you have placed the Balloon, but I haven't tried it lately.  To change the visibility status of that geometry afterwards, you can use the DrawingView.SetVisibility(oDCurve, False) method.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

Saikiran_arakeri
Enthusiast
Enthusiast

Will this work for parts which are completely overlapping each other in the drawing view. Here, the parts are totally identical and assembled parallel to each other, when I project this view, the component on the front completely overlaps the rear part even when the hidden lines are visible. Will this work in this case too?

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

I do not think I have tried it in that exact scenario before, but it makes logical sense that it should work.  When you use the GeometryIntent object that you created based on that component's geometry, as the only (or last) input in the LeaderPoints variable of the Balloons.Add() method for creating a new Balloon, that balloon will be linked to that specific component, because of the GeometryIntent.  There is also a way to make a balloon that is linked to a virtual component or a custom row in your DrawingBOM, by specifying that virtual component or custom DrawingBOMRow as the optional second input variable in the Balloons.Add method.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

Saikiran_arakeri
Enthusiast
Enthusiast

Okay @WCrihfield

 Let me try this approach once and get back to you.

 

0 Likes