Assembly level visibility tools

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been working for quite a while to create some assembly level tools for controlling visibilities for work features.
The situation is that in our office we commonly work with very large, multi-level, assemblies and I'm trying to figure
out a way to quickly hide or show all those work features that are nested in subassemblies on different levels.
I've implemented the part level code that Curtis Waguespack posted on his blog in another tool, where he used the referenced documents from the assembly. However, getting the same kind of behavior in an assembly environment is really stumping me, and the use of view representations is hardly making it easier.
Below you can see what I'm trying to do:
As you can see I have assembly level work features in the top, sub1 and sub2 levels. I'm trying to write my code so that it would traverse down the assembly hierarchy, identify work features of choice and set their visibility.
The issues that are preventing me from doing this as far as my understanding goes are:
- I cannot identify the type of Occurrence in the assembly tree, thus I cannot see if the occurrence is a work feature or not.
- View representations are messing with what my code can do when it goes deeper down in the hierarchy? If someone could explain, or link to a good explanation of view representation behavior when nesting assemblies, I would be incredibly grateful.
What I've been able to achieve so far is to set visibility for the top level assemblys' work features, or set visibility for *all* occurrences since I can't check what kind of object they are.
As far as I can tell, what I'm trying to do should be entirely possible, since the manual way of doing it is to just right click on each of the work planes in the image and disable visibility, so it all happens in the context of the top assembly and its "Default" view rep if I'm not mistaken.
Sorry if I went on for quite long here, I just wanted to clarify the issue and my thoughts on this. I hope someone can shed some light on it and, in the worst case, just let me know that this is not possible with iLogic code.
Best regards,
Tommy