Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA VBA : collections does not work in catia vba in some computers

Status
Not open for further replies.

jissididi

Automotive
Mar 17, 2015
46
FR
Hello everyone,

I have an issue with some computers running the same macro:
I create a collection to save selections.
then I want to use this collection to select the elements saved earlier in this collection (I can't do it by another way because I'm dealing with automatically generated PlanarSections for which ones I cannot chose the names. Otherwise I would have selected them thanks to their name but it is imposible).
Problem is that when I want to use the collection to select the elements, it does not work on some computers (all computers are using the same release of catia).
Is it some option that is not checked somewhere ?

Code:
oSelection.Search ("Name=" & geoSet)'a geometrical set in which one i have created my planarsections
oSelection.Search "CATPrtSearch.SkinFeature,sel"'to select in this geometrical set the planar sections(all of them)
For i = 1 To oSelection.Count
    myCollection.Add oSelection.Item(i).Value ' to add in my selection all the planar sections
Next
For i = 1 To numSection ' number of planar sections
        oSelection.Clear
        oSelection.Search "CATPrtSearch.SkinFeature,all"'select all the mesh...
        oSelection.VisProperties.SetShow 1'...to set them to invisible
        oSelection.Clear
        oSelection.Add myCollection.Item(i)'select the item "i" of my collection at each loop...
        oSelection.VisProperties.SetShow 0'...in order to set them to visible one after the other
        oSelection.Clear
Next

Thanks
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top