SteveJJH
Mechanical
- Feb 5, 2009
- 109
Hello.
We work with some fairly large assemblies, that for the most part don't need to be hugely complicated, however, the sub assemblies need to be fairly complicated for drawings and detailing.
I've added a yes/no custom property to our part template called "suppress on simplify".
I'm trying to write a macro that can traverse an assembly and suppress parts, even in sub-assemblies, that have the "suppress on simplify" property set to "yes". I don't need to suppress whole sub-assemblies.
It's been a while since I've used VB (I'm going to be using .NET for this), so I've forgotten most of what I learned.
As a starting point, I was just going to ask for some suggestions as to how to structure the macro.
I was thinking of opening all the sub-components and checking for the property, but then I'd have to create some sort of list that can be read once the sub-components are closed and the assembly is re-opened (or reactivated if you like). This also seems like it would be really long-winded.
I guess I'm asking if you can traverse an assembly and check the custom properties of any sub-components, then suppress them without having to open them and then close them again.
It being a toggle would be great, but I think that might make it twice as complicated, maybe I'll do it as two seperate macros.
We work with some fairly large assemblies, that for the most part don't need to be hugely complicated, however, the sub assemblies need to be fairly complicated for drawings and detailing.
I've added a yes/no custom property to our part template called "suppress on simplify".
I'm trying to write a macro that can traverse an assembly and suppress parts, even in sub-assemblies, that have the "suppress on simplify" property set to "yes". I don't need to suppress whole sub-assemblies.
It's been a while since I've used VB (I'm going to be using .NET for this), so I've forgotten most of what I learned.
As a starting point, I was just going to ask for some suggestions as to how to structure the macro.
I was thinking of opening all the sub-components and checking for the property, but then I'd have to create some sort of list that can be read once the sub-components are closed and the assembly is re-opened (or reactivated if you like). This also seems like it would be really long-winded.
I guess I'm asking if you can traverse an assembly and check the custom properties of any sub-components, then suppress them without having to open them and then close them again.
It being a toggle would be great, but I think that might make it twice as complicated, maybe I'll do it as two seperate macros.