×
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

Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

(OP)
thread560-347233: Change macro to link the title block on name of material
Hi
I read post old.
edite surce code :

Set oMaterial = Part.Paramters.GetItem( "Material" ) ' Root Material
Set oTextToLinkMaterial = Texts.GetItem("TitleBlock_Text_Material_1")
oTextToLinkMaterial.InsertVariable 1, Len(oTextToLinkMaterial.Text), oMaterial

But dont work!
Please helpe me for edite

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

do you set material using apply material or thru additional part properties?

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

(OP)
Yes
Where is copy it code?

Sub CATTitleBlockText()
...
Sub CATLinks()
...

and where is need edite "Drawing_Titleblock_Sample2.CATScript"?
very thanks

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

this is how to read part properties

CODE --> catscript

If ProductDrawn <> Nothing Then
    Texts.GetItem("TitleBlock_Text_EnoviaV5_Effectivity").Text = ProductDrawn.PartNumber
    Texts.GetItem("TitleBlock_Text_Title_1").Text  = ProductDrawn.Revision
    Texts.GetItem("TitleBlock_Text_Title_2").Text  = ProductDrawn.DescriptionRef
    Texts.GetItem("TitleBlock_Text_Title_3").Text  = ProductDrawn.Definition
    'Texts.GetItem("TitleBlock_Text_Title_4").Text  = ProductDrawn.Nomenclature
    Texts.GetItem("TitleBlock_Text_Title_5").Text  = ProductDrawn.TITLE.ValueAsString
    Texts.GetItem("TitleBlock_Text_Title_FILE_FOR_MANUFACTURING").Text = ProductDrawn.ReferenceProduct.UserRefProperties.Item("FILE FOR MANUFACTURING").ValueAsString
    Texts.GetItem("TitleBlock_Text_Title_7").Text  = ProductDrawn.Parent.Name
    Texts.GetItem("TitleBlock_Text_Title_8").Text = ProductDrawn.ReferenceProduct.UserRefProperties.Item("DRAWING No.").ValueAsString
    MTRL =ProductDrawn.ReferenceProduct.UserRefProperties.Item("MATERIAL").ValueAsString
    Texts.GetItem("TitleBlock_Text_Title_9").Text = ProductDrawn.ReferenceProduct.UserRefProperties.Item("MATERIAL").ValueAsString
    DrwSheets.Item(i).Views.Item(2).Texts.GetItem("TitleBlock_Text_Sheet_1_all").Text = CStr(nbSheet)
    Dim ProductAnalysis As Analyze
    Set ProductAnalysis = ProductDrawn.Analyze
    Texts.GetItem("TitleBlock_Text_Weight_1").Text = FormatNumber(ProductAnalysis.Mass,2)
  End If 

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

(OP)
Hi
Very thanks
But no runing!!!!
My file is attach.
Please help me for
1- insert material properties in TB
2- insert company logo in TB

I edit "Drawing_Titleblock_Sample2.CATScript" for material & Logo picture.but don't work.

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

above i posted the example how to get added properties. we set material in additional part properties

a picture you can add like this

CODE --> catscript

'The following example inserts a drawing picture from a given picture file path The MyView is the active view in the active drawing sheet 
 Dim MySheet As DrawingSheet
 Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet
 Dim MyView As DrawingView
 Set MyView = MySheet.Views.ActiveView
 Dim MyDrawingPicture1 As DrawingPicture
 Set MyDrawingPicture1 = MyView.Pictures.Add("C:\Program Files\Dassault Systemes\B24\win_b64\VBScript\FrameTitleBlock\TitleBlock_Picture_LOGOKanfit.bmp", 275., 29.) 

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

(OP)
Hi
Thank you very much
Your code for Picture are very good and used.
I set material using apply material.
But your code for parameter that created in Part or Product properties.
I want insert name of material that material apply in part or product.
Pls help me



RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

(OP)
Hi JeniaL
I apply material for patr.
Please help me for insert Material name in TitleBlock .
Best Regards

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

what do you mean by patr?

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

(OP)
Hello
: Part
Best Regards
I need inset material name in titleblock that Apply to Part.
such as Part name &...
above code for insert parameter name "MATERIAL" that created new parameter and type by user.
Best Regards

RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material

let's make it clear.
firs of all it's not such as part name/part number. part name/part number is a part property and not a parameter.
as i understand you want to assign material to part and then titleblock macro will get this parameter.
i don't really remember how to get parameters. i'll ask some people at work.
maybe guys on this board will help.

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