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.
Thanks,
John Alexander
SolidworksApi macros