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!

Change macro to link the title block on name of material 2

Status
Not open for further replies.

Paulizx

Mechanical
Jun 21, 2013
5
IT
Hi all,
I try to change the default macro of Catia to link the test on title block with the property of catpart.
I can not link the name of the material of catpart with a text.
I copy a part of code:
*********************
If ProductDrawn <> Nothing Then
Texts.GetItem("TitleBlock_Text_EnoviaV5_Effectivity").Text = ProductDrawn.PartNumber
Texts.GetItem("TitleBlock_Text_Title_1").Text = ProductDrawn.Definition
Texts.GetItem("TitleBlock_Text_Title_2").Text = ProductDrawn.Nomenclature
Dim ProductAnalysis As Analyze
Set ProductAnalysis = ProductDrawn.Analyze
Texts.GetItem("TitleBlock_Text_Weight_1").Text = FormatNumber(ProductAnalysis.Mass,2)
End If
***********************

Can you help me to insert on "TitleBlock_Text_Title_2" the name of material? please

Tahnks in advance
 
Replies continue below

Recommended for you

Hi,

Try to use Insert variable option of text as below...

Set oPartNumber = Part.Paramters.GetItem( "Part Number" ) ' Root Part Name

Set oTextToLinkPartNumber = Texts.GetItem("TitleBlock_Text_EnoviaV5_Effectivity")

oTextToLinkPartNumber.InsertVariable 1, Len(oTextToLinkPartNumber.Text), oPartNumber




Regards,
Maddy

The willingness to share knowledge does not make one charitable; it makes one self-reliant to know more.
Modified - Courtesy of Robert Brault
 
Thank you very much,
now I've solved the problem.

Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top