Catia VBA - Get Leader Stub Point
Catia VBA - Get Leader Stub Point
(OP)
Is there any way to get the point coordinates of Leader stub.
Please check the attached image. I have marked a point at the end of leader stub.
Link
I have tried to use Leader1.NbPoint but that gives me the count as 1 i.e. the Leader End Point (End Point of arrow)
Please check the attached image. I have marked a point at the end of leader stub.
Link
I have tried to use Leader1.NbPoint but that gives me the count as 1 i.e. the Leader End Point (End Point of arrow)





RE: Catia VBA - Get Leader Stub Point
indocti discant et ament meminisse periti
RE: Catia VBA - Get Leader Stub Point
I have tried available methods in the chm file:
Following are the ones listed, but still the "Point" that I want to access is not available. Or even the "stub length" also is not available.
AllAround
Returns or sets the status of all around.
AnchorPoint
Returns or sets anchor point.
HeadSymbol
Returns or sets symbol type of head side.
HeadTarget
Returns or sets target element of head side.
NbInterruption
Returns the number of interruptions of leader path.
NbPoint
Returns the number of points of leader path.
Method Index
AddInterruption
Add an interruption to an leader.
AddPoint
Add a point to an leader.
GetInterruptions
Get leader path.
GetPoint
Get leader point coordinates.
GetPoints
Get leader path.
ModifyPoint
Modify a point of an leader.
RemoveInterruption
Remove an interruption to an leader.
RemovePoint
Remove a point from an leader.
RE: Catia VBA - Get Leader Stub Point
Get leader path.
if the point you're looking for is not in the output, then it is not on the leader path.
indocti discant et ament meminisse periti
RE: Catia VBA - Get Leader Stub Point
CODE --> vba
Sub catmain() Dim myview As DrawingView Set myview = CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView Dim mytext As DrawingText Set mytext = myview.Texts.Item(1) Dim myleader As DrawingLeader Set myleader = mytext.Leaders.Item(1) Dim oX As Double Dim oY As Double For i = 1 To myleader.NbPoint myleader.GetPoint i, oX, oY MsgBox ("point: " & i & " (" & oX & " , " & oY & ")") Next i End Subindocti discant et ament meminisse periti
RE: Catia VBA - Get Leader Stub Point
The function GetPoint gives Leader Endpoint and Breakpoints, it won't give the stub end point.
myleader.NbPoint gives count as 1 unless we have any Breakpoints.
Or is there any way to get the stub length, so that stub end point can be calculated using Text Anchor point/Position?
RE: Catia VBA - Get Leader Stub Point
you might find what you looking for in the drafting standard
indocti discant et ament meminisse periti