Using SU version check to hide parts of a Dynamic Component
-
OK, so I'm incorporating the use of some dynamic components into a plugin I'm working on. The Dynamic component is adding features, but they aren't critical so things will still run under SU6, however some visual information on the DC will be misleading since it doesn't update based on changes to the attributes. So If someone opens a file in file in SU6 with these specific components, I want SketchUp to hide specific elements. I can select and hide, or probably better, put these sub-components on a layer that identifies them to be off in SU6, then the ruby can turn that layer off.
But then If someone opens with SU7 a similar test can be run to make sure that this layer is turned back on. The alternative is to have separate sets of components for SU6 vs SU7 users, but I think it is cleaner to avoid that. This will be more consistent when passed between SU6 and SU7 users. Hopefully SU6 users will be a small percentage, but I know they are still there.
Has anyone written a script like this before. I know it can be done, but just looking for insights from others who may have already done something like this, on the best approach.
Advertisement