×
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

Catia V5 Title Block Macro

Catia V5 Title Block Macro

Catia V5 Title Block Macro

(OP)
Hello,

I started working on creating a custom Title Block for our company (so far have been using a background template, manually filling out the fields).
An example drawing of ours can be found in the attachement.
There are a couple of things I don't know how to accomplish:

1. Inserting the roughness symbol, and value with the macro.
2. Inserting the corner transition symbols, according to ISO 13715:2000 (~DIN 6784). Alternatively, inserting a picture with that.
3. Drawing cirlces, for the ISO First Angle Projection symbol, or again, inserting a picture instead.
4. There is a boxed Technical Conditions list just left of the title block. How do I create boxed/framed text?

Thank you very much for any help you can offer.

RE: Catia V5 Title Block Macro

Hi,

1. Not possible in macro, as far as I know there is no API. Instead you can draw that symbol or use a 2DComponent (and insert with a macro).
2. I didn't check but I expect to be same situation like position 1.
3. Can be done in macro, almost everyone is doing this.
4. You can insert a text and then put a frame on it.

Please check the forum, there are few examples, even in the latest threads. I saw the drawing, if you need more help you can find me on LinkedIn, nickname is there smile (or you can post here your code and we will try to help you more).

Regards
Fernando

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

RE: Catia V5 Title Block Macro

(OP)
I attached the current version, with functional code for most of the stuff I want in it - except for the revision algorithm, which is not quite complete.

About the tips you gave me:

1&2. I'm not sure what a 2DComponent is in this context. I could just draw both things with Line2D and text (lineweight question at 3. would apply here as well, to make the look proper).
3. I drew the geometry of the symbol, what remains is to draw the center lines.
- I checked in the V5Automation document, and learned about the SetRealWeight and SetRealLineType methods. What I don't know is how to reference a specific line I have drawn. You can find the relevant code starting from Line583
4. Putting a frame, as in drawing lines, around the text is not what I'm looking for, as that text changes frequently, and the frame needs to autoresize according to the text (in the original I used the "frame" command from the Text Properties toolbar. Can that same thing be applies via macro (in a way that doesn't require me actually coding the algorithm to resize the frame)? If not, the engineer making the drw has to check and update that textfield anyway, applying the frame manually is an acceptable trade-off to having an automated title block.

Thank you.

RE: Catia V5 Title Block Macro

1. You can draw roughness symbol at desired location. Pretty simple.
2. the same as 1.
3. As Ferdo said. Example:

CODE --> VB

Set CircleOD = Fact.CreateClosedCircle(183.35, 11.325, 1.715)
    CircleOD.Name = "ProjCirc1"
    MyCATIA.ActiveDocument.Selection.Add CircleOD
    Set visProperties1 = MyCATIA.ActiveDocument.Selection.VisProperties
    visProperties1.SetRealWidth 2, 0.25 
4. As ferdo said or create a text add then craete a frame by drawing lines.
If you don't change text all the time then you can use frame created from lines, but if it's different all the time then put a frame over text using text properties.

RE: Catia V5 Title Block Macro

1&2. I would draw them as both of you suggested.
Just in case, check this link .
3. I'm also doing what JeniaL suggested.
4. I was referring about what JeniaL explained much better then in me in the last part of the point 4 (also you can find in forum examples about frame over text, most of them about circle or locked circle).

Regards
Fernando

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

RE: Catia V5 Title Block Macro

(OP)
I managed to get most of what I wanted done in a neat way... so far, so good. Also found the relevant methods for setting a rectangle frame on a text element.

Now that the titleblock itself is pretty much as I would like it, I have another element that I want to automate, and would appreciate the help:
Automatically renaming the sheets in the .catdrawing file, based on the same information that goes into the title block. We make one .catdrawing file for each subassembly (assembly drawing + technical drawing of components, each on a separate sheet) of the project. The naming convention of the sheets is as follows:
Properties\Nomenclature - Properties\Revision - Properties\DescriptionRef, resulting in something like 042-R01 Base Plate for instance.

Filling this info out manually leads to infrequent but annoying discrepancies, and all the fun and confusion that brings with it. Can this renaming also be automated via macros?

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