×
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

Drawing Text - Set Anchor mode to Global

Drawing Text - Set Anchor mode to Global

Drawing Text - Set Anchor mode to Global

(OP)
Hi,

Could somebody let me know how can we set the Anchor mode of a drawing text to Global.
[img D:\Text - Anchor Mode.jpg]

Not getting any API reference for this but seen a macro (catvbs) which does the same.(attached for reference)

Regards,
Maddy

RE: Drawing Text - Set Anchor mode to Global

Try to add a watch to Text and see what is happening when you are playing with different values for Text.AnchorPosition . You have a test file ( r18 ) also attached.

CODE --> catvba

Sub CATMain()


Set drawingDocument1 = CATIA.ActiveDocument
Set Sheets = drawingDocument1.Sheets
Set ActiveSheet = Sheets.ActiveSheet
Set Views = ActiveSheet.Views

For i = 3 To Views.Count
If i <> 2 Then
Set View = Views.Item(i)
Set Texts = View.Texts
For j = 1 To Texts.Count
Set Text = Texts.Item(j)

        Text.AnchorPosition = 28

Next
End If
Next


End Sub 

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: Drawing Text - Set Anchor mode to Global

(OP)
Hi,

Thanks ferdo, Infact i almost forgot it to try out.

Regards,
Maddy

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