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 Selection to collection

Status
Not open for further replies.

elmundo777

Automotive
Jun 23, 2020
93
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.

 
Replies continue below

Recommended for you

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