×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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 --> vba

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources