×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Catia VBA - Get Leader Stub Point

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)

RE: Catia VBA - Get Leader Stub Point

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






Eric N.
indocti discant et ament meminisse periti

RE: Catia VBA - Get Leader Stub Point

(OP)
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.

RE: Catia VBA - Get Leader Stub Point

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

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 Sub 

Eric N.
indocti discant et ament meminisse periti

RE: Catia VBA - Get Leader Stub Point

(OP)
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?

RE: Catia VBA - Get Leader Stub Point

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources