Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

CATIA drafting attribute link macro

Status
Not open for further replies.

longhduong

Aerospace
Jan 30, 2012
15
US
Hi All,

Platform/Environment: CATIA V5R21, Drafting workbench
Topic: VB script/macro to create leader with attribute link to 3D model attribute
My experience with macro/ scripts: Beginner level


Background:
In the drafting workbench, CATIA offers the ability to create a text leader with link to 3D attribute. To perform this command;
1) Select "Text with Leader" command
2) Select location of leader point
3) Select location of text
4) Dialogue box now appears for you to input text. Right click outside of dialogue box and select "Attribute Link".
5) Switch from drafting window to 3D model window and select the object to link.
6) Window should automatically switch back to drafting window after your object selection with the "Attribute Link Panel" dialogue box open. Select the name/value to link to.
7) The text editor box should now be populated with that value. Click ok to complete creating a text leader with link to attribute.

Catia also offers the ability to create a balloon with the attribute link to the CATPart name. The default setting for "Balloon" creates a balloon with a numeric value inside the balloon. In the CATIA settings window you can change the setting to have the balloon value show the name of the CATPart being selected.

The difference between the "Text with Leader" vs "Balloon" is that the Balloon does not require you to right click, switch to the 3D model, click on part, select the desired name/value to link to. It automatically populates the text with the name attribute of the selected object. Balloon however does not allow multi-line text, it is displayed on a single line (which almost always results in a line of text that extends beyond the balloon boundaries. Balloon leader does not move to fit with text. Ideally the "Text with Leader" has more control but to get the attribute link is cumbersome.

MY GOAL:
Create a macro that mimics the "Text with Leader" command with the "Balloon" feature that automatically populates the text with the name attribute of the selected object.


Hope that was clear. I can elaborate further if needed.
Thank you for your help!

-Long

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top