Hey All,
I've been editing the CATIA macro which controls the titleblock inside the drafting enviroment. Since macro recording is not working I'm trying to figure out how to add a logo into the titleblock.
What is use: Catia V6 2013x
Out of the box titleblock script (can be provided if needed)
I have tried following scripts:
Gives object not found error for "CATIA.ActiveDocument.Sheets.ActiveSheet"
And this:
which already errors when 'How to init the dialog and create main objects
'-------------------------------------------------------------------------------
Set Selection1 = CATIA.ActiveDocument.Selection
Any Help would be greatly appreciated.
I've been editing the CATIA macro which controls the titleblock inside the drafting enviroment. Since macro recording is not working I'm trying to figure out how to add a logo into the titleblock.
What is use: Catia V6 2013x
Out of the box titleblock script (can be provided if needed)
I have tried following scripts:
Code:
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:\tmp\ball.bmp", 100., 50.)
Gives object not found error for "CATIA.ActiveDocument.Sheets.ActiveSheet"
And this:
Code:
'Insert company logo
Set objPicture = Pictures.Add("c:\Drawing_Formats\logo.bmp", GetOH() + Col(3)+ 0.75, GetOV()+ Row(2) +.75 )
objPicture.Width = objPicture.Width / 5.75
objPicture.Height = objPicture.Height / 5.75
objPicture.Name = "TitleBlock_Text_Logo"
Set objPicture = Nothing
which already errors when 'How to init the dialog and create main objects
'-------------------------------------------------------------------------------
Set Selection1 = CATIA.ActiveDocument.Selection
Any Help would be greatly appreciated.