Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

CATIA Selection to collection

Status
Not open for further replies.

elmundo777

Automotive
Joined
Jun 23, 2020
Messages
93
Location
BY
Hello!
Is it possible to create a collection from selected items (parts,products)?
I need to create collection from "CATIA.ActiveDocument.Selection"

And then use For Each cycle to rename instance names in SELECTION.

Code:
For Each Item In ItemSelection
gives me the error:


Error BC32023 Expression is of type 'Selection', which is not a collection type.

 
use ItemSelection.count, i.e
for i = 1 to ItemSelection.count
... ItemSelection.item(i).value ...
next

regards,
LWolf
 
LWolf said:
use ItemSelection.count, i.e
for i = 1 to ItemSelection.count
... ItemSelection.item(i).value ...
next
Thanks!
And how can i get the selection name with extension?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top