×
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

Automatically Leader the Point Labels When Placing a Coordinate Dimension Table

Automatically Leader the Point Labels When Placing a Coordinate Dimension Table

Automatically Leader the Point Labels When Placing a Coordinate Dimension Table

(OP)
Can this be done? When we create the Coordinate Dimension Table, each point gets a text label next to it, but no leader. We always have to go back through all of the points and use the Add Leader command on each text label and click the respective point.

Is there a style setting in the Standards or an Option that I'm missing to turn on automatic leaders to these texts?

RE: Automatically Leader the Point Labels When Placing a Coordinate Dimension Table

This should fix it. Just select all your texts before running it.

CODE -->

Sub CATMain()
    Dim oDrw As DrawingDocument
    Set oDrw = CATIA.ActiveDocument
    For i = 1 To oDrw.Selection.Count
        On Error Resume Next
        Dim oText As DrawingText
        Set oText = oDrw.Selection.Item(i).Value
        If oText.Leaders.Count = 0 Then
            Set oPoint = oText.AssociativeElement
            Dim arra(1)
            oPoint.GetCoordinates arra
            oText.Leaders.Add arra(0), arra(1)
        End If
    Next
    On Error GoTo 0
End Sub 

Hope it helps,
Calin

RE: Automatically Leader the Point Labels When Placing a Coordinate Dimension Table

(OP)
Thank you very much, but what would one do with that?

RE: Automatically Leader the Point Labels When Placing a Coordinate Dimension Table

As there is no style setting, standard setting or application setting that will create your leaders for you, the above code will create all those Leaders for you.

1. Select your texts
2. Run the script.
3. That's it: leaders are going to be created automatically so you won't lose time doing them.

Hope that's clearer,
Calin

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