Continue to Site

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!

Drawing Text - Set Anchor mode to Global

Status
Not open for further replies.

Maddy02

Mechanical
Feb 14, 2013
114
IN
Hi,

Could somebody let me know how can we set the Anchor mode of a drawing text to Global.


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

Regards,
Maddy
 
Replies continue below

Recommended for you

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:
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

 
Hi,

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

Regards,
Maddy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top