Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catia VBA - Get Leader Stub Point

Status
Not open for further replies.

man2007

Aerospace
Nov 6, 2007
283
IN
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)
 
Replies continue below

Recommended for you

Solution is in V5automation.chm which is in your catia install folder.








Eric N.
indocti discant et ament meminisse periti
 
Hi itsmyjob,
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.
 
GetPoints
Get leader path.

if the point you're looking for is not in the output, then it is not on the leader path.

Eric N.
indocti discant et ament meminisse periti
 
Code:
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 Sub

Eric N.
indocti discant et ament meminisse periti
 
Hi itsmyjob,
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?
 
sorry i was wrong I had the feeling you were looking for leader points...

you might find what you looking for in the drafting standard

Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top