×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Drawing Template: Link Jpeg

Drawing Template: Link Jpeg

Drawing Template: Link Jpeg

(OP)
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

RE: Drawing Template: Link Jpeg


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

RE: Drawing Template: Link Jpeg

(OP)
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?

RE: Drawing Template: Link Jpeg

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.

RE: Drawing Template: Link Jpeg

(OP)
PeterGuy,

That tells me how to crop it, position it etc.

Could you tell me the code for inserting it in the first place?  

RE: Drawing Template: Link Jpeg

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

RE: Drawing Template: Link Jpeg

(OP)
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?

RE: Drawing Template: Link Jpeg

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

RE: Drawing Template: Link Jpeg

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources