Insert VBA Material + Logo into CATIA Cartridge

Hello

I would like to change the VBA code of my cartridge so that the material is automatically recognized and my company logo is displayed.

I found a few pieces of code on the internet that don't work:

    'Texts.GetItem("TitleBlock_Text_Material_1"). Text =    ProductDrawn.UserRefProperties("Material")
     'DrwTexts.GetItem("TitleBlock_Text_Material_1"). InsertVariable 0, 0, ProductDrawn.Parameters.Item("Material")

'Sub CATMain()
'Set opic = CATIA. ActiveDocument.Sheets.ActiveSheet.Views.Item(1). Pictures
'Set onewpic = opic. Add("C:\your_pic.bmp", 100, 100)
'End Sub

That's my problem! So if anyone knows, I thank them in advance!!

Thank you

Yoann

Hello

First of all, if the code is preceded by an apostrophe, it means that it is a comment, so that the code is not active!

Try to remove all the apostrophes at the beginning of the line.

1 Like