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!

LINK SCALE IN TITLE BLOCK

Status
Not open for further replies.

harlowmatt

Aerospace
Nov 11, 2014
71
US
Hi everyone,
You will have to excuse my ignorance on CATIA macro writing. I am trying to link my title block macro so that my scale size text is linked to the drawing front view scale in the properties dialog box. The rest of the title block info is pulled from the properties of the model. TitleBlock_Text_Scale_1 is the name of the text for the scale size. Any help with this would be great.
 
Replies continue below

Recommended for you

THANKS DREW,
I AM WANTING IT TO AUTOMATICALLY PULL IN THE SCALE WHEN THE MACRO IS RAN,AS IT DOES THE REST OF THE INFO, THAT CREATES THE TITLE BLOCK.
 
Code:
Sub CATMain()

Dim drawingDocument1 As DrawingDocument
Set drawingDocument1 = CATIA.ActiveDocument

Dim drawingSheets1 As DrawingSheets
Set drawingSheets1 = drawingDocument1.Sheets

Dim drawingSheet1 As DrawingSheet
Set drawingSheet1 = drawingSheets1.Item("Sheet.1")

Dim drawingViews1 As DrawingViews
Set drawingViews1 = drawingSheet1.Views

Dim drawingView1 As DrawingView
Set drawingView1 = drawingViews1.Item("Main View")

Dim drawingTexts1 As DrawingTexts
Set drawingTexts1 = drawingView1.Texts

Dim drawingText1 As DrawingText
Set drawingText1 = drawingTexts1.GetItem("TitleBlock_Text_Scale_1")

drawingText1.Text = drawingSheet1.Scale2

End Sub

Drew Mumaw
 
thanks, now I just have to figure out how to integrate it in to the title block macro so that it pulls this in instead of the default 1:1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top