Catia V5 Rename Partnumbers of Bodies by UserForm
Catia V5 Rename Partnumbers of Bodies by UserForm
(OP)
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 --> VBA
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 




RE: Catia V5 Rename Partnumbers of Bodies by UserForm
In the picture attached is the body feature properties (right mouse button click on body).
Where do you want to fill those properties ? Did you tried to do it manually first ? Do you want to create some parameters under body or ?
As I remember, Eric recommend you to do a single part1.Update not each time (but this is not the main problem as I can see).
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: Catia V5 Rename Partnumbers of Bodies by UserForm
RE: Catia V5 Rename Partnumbers of Bodies by UserForm
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: Catia V5 Rename Partnumbers of Bodies by UserForm