I am trying to connect a Leader to the DVLine object in Drawing View using following method,
All the entities in Drawing view are starting with DV like DVLine, DVArc, DvCircle etc.
objLeader = objLeaders.AddByConnect(Object, X1, Y1, 0,False , X2, Y2, 0)
Here i am passing object as,
Dim DVline As SolidEdgeDraft.DVLine2d
X1,Y1 as Leader connect
X2,Y2 as end point of DVLine
I observed that Leader does not connect to DVLine but take some
Arbitrary vague point (Not the end point of DVLIne)
I checked it with the Normal line as,
Dim objLine As SolidEdgeFrameworkSupport.Line2d
It gets connected properly.
Can anybody tell me what is wrong with it ?
Posted by: Ravindra MujumdarPost date: 7/6/2010 7:53:26 PM
The DVline is inside a DrawingView, and the Leader is outside.
You need to access to a reference of the DVline2d. That somehow converts coordinates and scale inside the view to sheet coordinates.
I think this should work:
objLeader = objLeaders.AddByConnect(Object.Reference, X1, Y1, 0,False , X2, Y2, 0)
Object is a DVline2d.
All the DV-Whatever objects have a Reference property.
Posted by: Julian GuilloPost date: 7/6/2010 10:11:34 PM
Oh ! Great.
The solution given by you workrd very well.
Thanks a lot.
Posted by: Ravindra MujumdarPost date: 7/7/2010 10:16:50 PM