jissididi
Automotive
- Mar 17, 2015
- 46
Hello all,
I have an issue in a macro i'm making
I have various geometrical set all of them for different uses
in those Geometrical sets, I created some planar sections and then I want to rename them all "Planar Section.1" "Planar Section.2" "Planar Section.3"...
to create the planar sections, I create them all at the same time using the mesh and all the different planes and creating them by plane.
problem is that if there has been a section created previously, my first created section won't have the name "Planar Section.1"
So i created a selection of all the planar sections in the geometrical set corresponding, used the selction.item(i) to make a for loop and rename them all
but it doesn't work...
here is my idea
Anyone has a working idea ?
Thanks
jissididi
I have an issue in a macro i'm making
I have various geometrical set all of them for different uses
in those Geometrical sets, I created some planar sections and then I want to rename them all "Planar Section.1" "Planar Section.2" "Planar Section.3"...
to create the planar sections, I create them all at the same time using the mesh and all the different planes and creating them by plane.
problem is that if there has been a section created previously, my first created section won't have the name "Planar Section.1"
So i created a selection of all the planar sections in the geometrical set corresponding, used the selction.item(i) to make a for loop and rename them all
but it doesn't work...
here is my idea
Code:
oSelection.Clear
Set oSelection = CATIA.ActiveDocument.Selection
oSelection.Add part1.FindObjectByName("AUTO_MODE_GEOMETRICAL_SET")
oSelection.Search "'Part Design'.'Wireframe & Surface Feature';sel"
iterationAutoMode = oSelection.Count
For i = 1 To iterationAutoMode
oSelection.Item(i).Value.Name = "AUTO_MODE_GEOMETRICAL_SET_SECTION_" & i
Next
Anyone has a working idea ?
Thanks
jissididi