- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @MatthiasMinich. Your code is 'toggling' the visibility of every WorkPlane of every pre-selected component in the context of that component's parent assembly. If you want to change the visibility of the WorkPlanes within the context of the component's referenced model file, then you should skip the 'proxy' steps. And if the component is not a top level component, you would need to step the proxy reference up however many levels it takes to get to the top level assembly's context. Creating a proxy of a 4th level component WorkPlane gets you a reference to its virtual copy within the context of its parent assembly, which is at 3rd level, not top level. Since it is 'toggling' them, then if the component currently has all of its origin WorkPlanes turned off, and one custom WorkPlane visible, then running the rule will, by design, leave the origin WorkPlanes on, and the custom one off. That is the definition of toggling. To change it from toggling, change that line of code for setting Visible property to using a normal True or False value.
Wesley Crihfield
(Not an Autodesk Employee)