AnsweredAssumed Answered

Detect if Assembly Component is in a folder

Question asked by John Alexander on Apr 4, 2017
Latest reply on Apr 5, 2017 by Peter Brinkhuis

I'm trying to sort assembly components into folders according to the custom property "vendor". I'm just traversing the assembly using AssemblyDoc::GetComponents and checking for the existence of the folder before trying to create one or move the current component.


The problem with this approach is that it wants to move components that are already in folders. The current macro is functional but it would run much faster if I could skip components that are already in folders. I can't seem to figure out how to do that.


I have tried traversing the getFeatures array via the featuremanager instead of the getComponents array via the AssemblyDoc but this got messy.


I attached the macro as-is. If anyone has a suggestion for improvement, I will post the latest version when I incorporate those changes.




John Alexander