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
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
RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material
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
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 IfRE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material
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
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
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
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
RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material
: 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
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.
RE: Creat new parametre for CATIA Drafting TitleBlo macro to link the title block such: name of material
You can try to modify your script with something like in this thread.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU