Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing Template: Link Jpeg

Status
Not open for further replies.

mechanicalman1

Automotive
Sep 10, 2004
24
0
0
GB
Hello,

I have modified one of the catia frame and title blocks, but I would like to link a jpeg of our logo, and have it inserted in a specific place when I create my border. Is there any way to do this?

Thanks,

MechMan
 
Replies continue below

Recommended for you


There is no need to "link" a .jpeg. Just insert it, using insert -> picture. If you try to insert a .jpeg as a linked object, will only display the file name, or the icon.

You can write a script to do this, or just manually place the picture in the title block.



-----------------------------------------------------------
Catia Design|Catia Design News|Catia V5 blog
 
Thanks,

Yes I insert the image at the moment, but I then have to manually place the image. I am trying to automate it all!

Can you give me any more information on writing a script?

Will this enable me to place the image at a certain position on the drawing template?
 
Picture Object Property Index
cropBottom
Returns or sets the cropBottom of the drawing picture.
cropLeft
Returns or sets the cropLeft of the drawing picture.
cropRight
Returns or sets the cropRight of the drawing picture.
cropTop
Returns or sets the cropTop of the drawing picture.
format
Sets the picture format.
height
Returns or sets the height of the drawing picture.
ratioLock
Returns or sets the ratioLock of the drawing picture.
width
Returns or sets the width of the drawing picture.
x
Returns or sets the x coordinate of the drawing picture position.
y
Returns or sets the y coordinate of the drawing picture position.

Picture Object Method Index
GetOriginalHeight
Gets the original height of the drawing picture.
GetOriginalWidth
Gets the original width of the drawing picture.
 
If its a drawing template, can't you just insert and position it once, then it will be there whenever you use the template?

Why the need for a script? (Just questioning for my own understanding, that's all)

--Jay
 
I am by no means an expert, but here is my reasoning

I use the Catia drawing template macros to create my drawing border. I have then modified this to my companies needs (added a tolerance block etc). Because I am using the macro, it pulls all the information in from the drawing, so the drawing border is filled in automatically.

I could have created a drawing template, and positioned any text/jpeg's. But I don’t think this would have enabled me to pull in any information from the drawing.

Unless I am mistaken?
 
Pictures Method Index
Add
Inserts a drawing picture in the drawing view and adds it to the DrawingPictures collection.
Item
Returns a drawing picture using its index or its name from the DrawingPictures collection.
Remove
Removes a drawing picture from the DrawingPictures collection.

the picture object is a child of

CATIA.Documents.Document.Sheets.Sheet.Views.View.Pictures.Picture
 
'Example:
'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:\tmp\ball.bmp", 100., 50.)

 
Status
Not open for further replies.
Back
Top