norkamus
Aerospace
- May 15, 2012
- 76
Hello. I guess I will basically asking this to Ferdo, because I'm sure he'll be the first to reply.
I have been to many resources about VBA scripting. Everywhere I go I learn the same thing; about data types and loops. I totally understand this kind of stuff in VBA, but I have no idea where to START with CATIA. I have yet to find a resource that describes what the wording looks like to select say, a body's color property, and how to change it. Or how to open the properties dialog while a part is selected and change a property.
Without the record macro option, there is no way to learn this stuff.
I will ask for a specific example of what I expect to be a dead simple script.
With a CATPart file open with a single body. I wish to select the body with the mouse. Then I wish to hit a button that will run a script (I know how to assign a macro to a button). I want that script to change the color of the body to a light grey, and then change the line width to the thinnest available line width.
I feel like if I SEE this script, I will be able to start figuring out how to make my own. My scripts will likely all be extremely simple like this one, just changing properties in bulk.
That's it.
I would be unendingly greatful for help with this one. Again, I'm asking someone to write this for me, so I can see it and learn some basic CATIA language.
Nick
Light structural commercial aircraft parts
PCDMIS 4.3 CAD++, CATIA V5 R20, NX6
APM Consortium Inc.
Cambridge Ontario, Canada
I have been to many resources about VBA scripting. Everywhere I go I learn the same thing; about data types and loops. I totally understand this kind of stuff in VBA, but I have no idea where to START with CATIA. I have yet to find a resource that describes what the wording looks like to select say, a body's color property, and how to change it. Or how to open the properties dialog while a part is selected and change a property.
Without the record macro option, there is no way to learn this stuff.
I will ask for a specific example of what I expect to be a dead simple script.
With a CATPart file open with a single body. I wish to select the body with the mouse. Then I wish to hit a button that will run a script (I know how to assign a macro to a button). I want that script to change the color of the body to a light grey, and then change the line width to the thinnest available line width.
I feel like if I SEE this script, I will be able to start figuring out how to make my own. My scripts will likely all be extremely simple like this one, just changing properties in bulk.
That's it.
I would be unendingly greatful for help with this one. Again, I'm asking someone to write this for me, so I can see it and learn some basic CATIA language.
Nick
Light structural commercial aircraft parts
PCDMIS 4.3 CAD++, CATIA V5 R20, NX6
APM Consortium Inc.
Cambridge Ontario, Canada