Layer-On/Off switch

M

Mac

This is an interesting one: In my drawing I have several layers each one
packed with objects. In addition, these objects are arbitrarily grouped
together accross the layers. Now, first I want to have only one layer
switched visible so I can only see this layer's objects (which are in groups
with objects from different layers that I cannot see at the moment). Then,
when I click one of the visible objects (which is a part of a group), I want
those layers whose objects form the remainign part of this group
automatically switched visible...uhm, do I make myself clear?:) Imagine a
bathroom model (top view), in it is a 1.) sink layer, 2.)plumbing layer and
3.) power lines layer; layers 2 and 3 are switched invisible so you can only
see the sink which is grouped with plumbing layer. The desired behaviour is
like - you click the sink, then click a button and the plumbing suddenly pops
out. Does anybody know how to do that?
 
P

Paul Herber

This is an interesting one: In my drawing I have several layers each one
packed with objects. In addition, these objects are arbitrarily grouped
together accross the layers. Now, first I want to have only one layer
switched visible so I can only see this layer's objects (which are in groups
with objects from different layers that I cannot see at the moment). Then,
when I click one of the visible objects (which is a part of a group), I want
those layers whose objects form the remainign part of this group
automatically switched visible...uhm, do I make myself clear?:) Imagine a
bathroom model (top view), in it is a 1.) sink layer, 2.)plumbing layer and
3.) power lines layer; layers 2 and 3 are switched invisible so you can only
see the sink which is grouped with plumbing layer. The desired behaviour is
like - you click the sink, then click a button and the plumbing suddenly pops
out. Does anybody know how to do that?

95% of this functionality is only one button click away. Just add the
View toolbar.
menu View -> Toolbars and select "View".
Now click on the layers icon and you can select which layer(s) you
want to see.
 
M

Mac

I'd say that what this functionality does for me is 95% away from perfection.
:) My point is that I do not know which layers I have to switch 'on' ;
that's what I want the code to do - 'you've clicked group 'abc' and that is
composed of objects from layers 'a', 'c' and 'f', so I'll trun those layers
 
P

Paul Herber

well, as you said in your original message, have a sink layer, a
plumbing layer, a power layer etc. 25 layers!!!!! Having layers
switched on and off automatically just by clicking on something sounds
like a nightmare.
 
M

Mac

Oh, c'mon Paul...it cannot be that hard.. Let me recap in plain English: the
precondition is that you have selected (a mouseclick) your group, now for the
code: get what's selected on the page; if it's a group, see what its members
are and what the home layer of each is; light up each of these layers;
taddaa... My only problem is that I can't code in VBA too smoothly :)-) ) and
I'd like someone to guide me...:)
 
D

David Parker

Mac,

You got me thinking about updating some previous work I did, so I hopeyou
find the following blog entry useful:

http://bvisual.spaces.live.com/blog/cns!3350D61BC93733A9!180.entry


Mac said:
Oh, c'mon Paul...it cannot be that hard.. Let me recap in plain English:
the
precondition is that you have selected (a mouseclick) your group, now for
the
code: get what's selected on the page; if it's a group, see what its
members
are and what the home layer of each is; light up each of these layers;
taddaa... My only problem is that I can't code in VBA too smoothly :)-) )
and
I'd like someone to guide me...:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top