I would like to know the methods to select a component in an open assembly from a macro. And if possible the information associated with it, such as its file name, its folder, the type of document (part, assembly, etc.), etc. determine whether it is an instance, a repetition, a symmetry.
In summary, I would like to be able to select a component, perform an operation, select the next one, perform an operation, etc
If I remember correctly, when it scans the feature manager, it lists the "designations" of the first level (it normally considers that a repetition is a tree element if I remember correctly) so we can simply exclude from the processing what starts with repetition, or even stop the processing as soon as we come across the constraints since anyway the repetitions are in under.
To know if it's a second occurrence, it seems to me that it also indicates the number of the occurrence, so just apply the treatment at that time.
Yes, in the absence of property or method that's what I thought I'd do for occurrences.
What's annoying is that it lists (crosses) the components in order of addition in the assembly (or not, since some instances (screws) are not even numbered in order) and not in the same order of appearance as in the tree. Would you know if there is a predestined way to choose the order in which to go through the components (order in the tree, alphabetical order, etc.)? It could save me loops of dissecting strings or reclassification.