Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Code to place jpg in drawing

tspowell

New member
All I need to do is place a jpg file of our logo in the drawing format. I have altered the titleblock macro to create our format but need a little help with code to place the logo. Any ideas?

Thanks for your help!

Steve
 
Maybe I should say whatfunction is used to place a jpg picture file into a drawingor make an OLE link to a jpg file (getfile()???).

Thanks,
Steve
 
I finally found the doc file for CAA V5 Visual Basic... here's an example of the code to do the trick:

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.)



Hope this helps someone else...
Edited by: tspowell
 

Sponsor

Articles From 3DCAD World

Back
Top