us01
New member
- Oct 29, 2012
- 14
Hello,
First of All, i'd like to thank the person who helped me last time, due to him, i had improuved my Catia Level (sadly, not in english ..)
So i'finish my code, but it still not working, i mean, it fonction but not fully. Can anyone have a look on my code and tell me my errors ?
This userform helps me to fill the proprietes of Bodies
Thx Everyone
Best Regards
Here is my UserFormInterface
- I named the boxes as "TextBox1", "TextBox2", "TextBox3"
here is my code :
First of All, i'd like to thank the person who helped me last time, due to him, i had improuved my Catia Level (sadly, not in english ..)
So i'finish my code, but it still not working, i mean, it fonction but not fully. Can anyone have a look on my code and tell me my errors ?
This userform helps me to fill the proprietes of Bodies
Thx Everyone
Best Regards
Here is my UserFormInterface
- I named the boxes as "TextBox1", "TextBox2", "TextBox3"
here is my code :
Code:
Sub CATMain()
Set documents1 = CATIA.Documents
Set partDocument1 = documents1.Add("Part")
Set part1 = partDocument1.Part
Set bodies1 = part1.Bodies
Set body1 = bodies1.Add()
part1.Update
Set body2 = bodies1.Add()
part1.Update
Set body3 = bodies1.Add()
part1.Update
Set body4 = bodies1.Add()
part1.Update
Set product1 = partDocument1.GetItem("Part1")
strPath = "H:\VBA\Project\ProjetVBA1.catvba"
strModule = "modMain"
strProcedure = "CATMain"
UserForm1.Show 0
UserForm1.TextBox1.Value
If UserForm1.TextBox1.Text = "" And _
UserForm1.TextBox2.Text = "" And _
UserForm1.TextBox3.Text = "" And _
UserForm1.TextBox4.Text = "" Then
Else
End If
End Sub