us01
New member
- Oct 29, 2012
- 14
Hello,
First, i want to thx you for your help in the previous post. I creat a new subject.
I want to creat an interface to fill "part names". So i'll try to explain you in the following lines how my macro script should work.
After launching Catia V5, I should click on macro and launch it, the macro should like the following panel, where i'll find an interface that i had to fill the blanks. After filling the blanks, Catia will openend me a part, with the text written in the blanks.The written stuff will be replace the proprietes of the part
To understand it, i show it in a drawing.
I know who to built a userpannel in Visual Basic but i didn't know how to code it.
If you can help me !
I will be grateful
Here is the code of 4 parts
First, i want to thx you for your help in the previous post. I creat a new subject.
I want to creat an interface to fill "part names". So i'll try to explain you in the following lines how my macro script should work.
After launching Catia V5, I should click on macro and launch it, the macro should like the following panel, where i'll find an interface that i had to fill the blanks. After filling the blanks, Catia will openend me a part, with the text written in the blanks.The written stuff will be replace the proprietes of the part
To understand it, i show it in a drawing.
I know who to built a userpannel in Visual Basic but i didn't know how to code it.
If you can help me !
I will be grateful
Here is the code of 4 parts
Code:
Language="VBSCRIPT"
Sub CATMain()
Dim documents1 As Documents
Set documents1 = CATIA.Documents
Dim partDocument1 As Document
Set partDocument1 = documents1.Add("Part")
Dim part1 As Part
Set part1 = partDocument1.Part
Dim bodies1 As Bodies
Set bodies1 = part1.Bodies
Dim body1 As Body
Set body1 = bodies1.Add()
part1.Update
Dim body2 As Body
Set body2 = bodies1.Add()
part1.Update
Dim body3 As Body
Set body3 = bodies1.Add()
part1.Update
End Sub