In CATIA, every feature have its own properties corresponding to specific addresses representing it. For example, pad.1 feature has FirstLimit as a property with Length as a parameter of it (as see in the picture). Is it possible to work with this available and default parameters or properties or features through VBA, to, for instance, change the value of some of those parameters, as the way I work with Formulas dialogue as shown in the attached picture.
Asked
Active
Viewed 490 times
1

Hung Pham Vu
- 39
- 5
-
And what is your question? e.g for a pad: you can get the limits (_FirstLimit_ and _SecondLimit_) and modifiy this dimension. Or use _Sublist_ on the pad to get all parameters of the pad (see documentation) – Shrotter Dec 07 '22 at 17:02
-
Are there any ways to present some of those paramters in drawings through just VBA codes? e.g. I want to show the thickness of Pad.1 in the drawing automatically – Hung Pham Vu Dec 08 '22 at 10:17
-
Yes it is possible. And where do you run into troubles? Get the pad? Get the thickness parameter? Create a _Attribute Link_ in the drawing? – Shrotter Dec 08 '22 at 10:30
-
@Shrotter Yes, I run into showing some dimensions like length, width, thickness,... Can you please tell clearer about _Attribute Link_ ? – Hung Pham Vu Dec 08 '22 at 10:34
-
For attribute link see: [documentation](http://catiadoc.free.fr/online/cfyugdr_C2/cfyugdrannotations0103.htm) , for create these using vba see e.g. [here](https://stackoverflow.com/a/47404995/17172829) – Shrotter Dec 08 '22 at 10:38
-
@Shrotter I got it, but it lead me to an another question: Is it possible to create arrows between two points or two faces as a way to show dimensions of an object by VBA? I mean sth like arrows under the text linked to parameters. Could they be created automatically through VBA? – Hung Pham Vu Dec 08 '22 at 11:02
-
No, I think it is not possible, because generative elements (projected from 3d) are not accessible via macro. – Shrotter Dec 08 '22 at 11:16
-
@Shrotter Does it mean that the demension like that in the attached image following (between two holes) or something like that (diameter, length, width, etc.) can't be created by VBA codes? Image Link: https://drive.google.com/file/d/1XmHQVb7ZWvqohES_PDf9kGDhYBNDXtXJ/view?usp=sharing – Hung Pham Vu Dec 14 '22 at 09:37
-
You can only create dimensions between on in the view generated 2d geometry (see example on the DrawingDimensions object in the documentation) and not generative elements (from 3d) – Shrotter Dec 14 '22 at 15:40