0

For example, when I create a part in Catia, I add a plane at a certain offset. Now, I make a drawing, and want to include a table where this offset is listed. Manually, I can rightclick it, insert an attribute link, and click on the desired offset in the opened part to link them. However, I would like to automate the process. I succeeded in creating a table through a macro, and can list some properties like the part name through VPMReference.

Texts.GetItem("TitleBlock_Text_Title_1").InsertAttributeLink 0, 0, VPMRef, "Feature", "Name"

However, I cannot find a solution to link individual properties of the part through a macro. I tried recording a macro with the tools included in the Catia Drafting app, but the insertion of the macro does not get registered in them. I also cannot find any documentation on whether this would be possible at all or not. Anyone have any idea on how to tackle this problem? Thanks in advance!

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
  • 1
    I have never seen the method _InsertAttributLink_, is this new? As shown [here](https://stackoverflow.com/a/47404995/17172829) parameters can insert in drawingtexts using _InsertVariable_ – Shrotter Oct 20 '22 at 08:36
  • Alright thanks, I'll have a look there. I'm not sure whether it is new or not, as I've only started using Catia 2 months ago. I found the command in *Install Location*\Dassault Systemes\B424_Cloud\win_b64\VBScript\FrameTitleBlock\Drawing_Titleblock_Sample1.CATScript , which is used as the default for creating templates for drawings, but could not find any documentation on the command anywhere. – Maarten van den Berg Oct 20 '22 at 08:58
  • in older releases they use _InsertVariable_ in this examples. – Shrotter Oct 20 '22 at 09:36

0 Answers0