Hi sir,
i have already my code, here it'is
Sub CATMain()
Dim giverPartName As String
givenPartName = InputBox("Type a valid part number", "Part Number Definition")
If givenPartName <> "" Then
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part...
Hello sir,
i'm late, but i'd like to thanks you for your help.
Actually, VBA isn't my job, and i begin this adventure without any knowlege and i try different "code" founded on internet. But i think i really need to learn it properly
Exactly sir, i just want to rename the new bodies names with a VBA And later if i understand the right working way of macro, i'll add a "line" to catalogue of materials ! But i'm not there ! first of all, i want to rename new bodies
I can do it manually, but i want to made a macro, when i click on it, the "userform" will appear, and i should fill the blanks on the macro and thats will made me 5 "bodies" with the name that i have filled in the "textbox".
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...
I didn't find it, but may be, in French version, things are differents ?
I have just a last question, how can i attribute a field (for exemple IPN-PO) a function.
And Did you think that the eaiest way to do small programm is to make "macros" ?
Thx
Hello sir,
Thx you, i'll try to learn the programmation in VBA, but programmaing on VBA and on CAT VBA is the same thing ?
I'll try to post my code soon !
THX
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...
I tried to follow your steps,
Sub CATMain()
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
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...
my code
Sub CATMain()
Dim documents1 As Documents
Set documents1 = CATIA.Documents
Dim partDocument1 As PartDocument
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 =...
Hello sir,
First of All, i'would like to thank you for your response.
I actually want to do what you see on the right of the arrow
- IPN-Po-XY-XY-XY
+IPN-PO-XXXX
+NIN-ø-XXXX
+FICTIONDIEN
+GURAGE
BUT WHEN I have done the macro, i get "corps principal" (it's in French, but it means...
Hello,
i'm "David" from France, here to approuve my Catia level(And English too). Actually i'm working in a space company.
I want to built a macro, to creat a "part" with 4 "corps", each one is named differently.
My problem : i creat a macro, i rename my 4 "corps". but when i run the macro...