×
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

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

Change macro to link the title block on name of material

Change macro to link the title block on name of material

(OP)
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

RE: Change macro to link the title block on name of material

2
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

RE: Change macro to link the title block on name of material

(OP)
Thank you very much,
now I've solved the problem.

Bye

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