Jump to content

Dynamic block - Multiple lookup problem


Bogbadbob658

Recommended Posts

I'm trying to put 2 lookups into one block to control 2 different objects. The simplest way to describe it would be Lookup1 controls text saying 1,2,3 and Lookup2 controls text saying A,B,C. My problem is that if I select from Lookup 1 it turns all the items in Lookup2 on and visa versa. What I want to be able to do is to to select from both lookups without effecting the other and I don't want a single lookup that give all the possible permutations.

My question is it possible restrict the lookup to only selected items? I assume it must be otherwise there is no point in allowing multiple lookup actions.

My next question is of course, if it is possible how do you do it?

I have attached a file that may help explain it better

 

TEST.dwg

Link to comment
Share on other sites

Replace the MText with attributes and make sure they are single line. Then insert a field as the default value for the attribute. Select BlockPlaceholder as the field type and then select Either the lookup for text or numbers. I've attached an example of this. I removed the visibility parameter since it is not needed with this.

 

***Edit*** You will need to regen the drawing or update fields to see the text change.

 

If you are looking to control different linework visibility with lookups thats a much more complicated proposition. Basically you would need a lookup for each visibility setting. This works out to y^x where x is the number of "switches" and y is the number of options per switch. So for 2 objects with 3 states each it would be 3^2 visibility states (A1, A2, A3, B1, B2, B3, C1, C2, C3). Then multiple lookup states will need to be made for each visibilty state, and will need to be turned on and off per state. So when in visibility state A1, the letter lookup would always show options A, B, C, but would currently control visibility states A1 (currently set), B1, and C1. While the number lookup would always show 1, 2, 3 and would currently control visibility states A1 (currently set), A2, A3. If you changed the letter lookup to B, your visibility state would change to B1. In this state the new letter lookup would still control A1, B1 (currently set), C1. But the new number lookup would control visibility states B1 (currently set), B2, B3. I know thats difficult to understand (and this is a simplified example!). But it's currently the only way I know to get around having only a single visibility set.

ABC123 Attribute Example.dwg

Link to comment
Share on other sites

Thanks for the help. Unfortunately the attribute option is not what I’m looking for as I want to be able to select pre-defined text however the rest of the explanation has helped. The problem I now have is when creating the lookup table the reverse action is disabled if you try and put the same description into more than one cell. I have attached an example showing where the reverse action is working on one block (in part) but not the other. It must be possible otherwise there is no point in allowing multiple lookups

test1.dwg

Link to comment
Share on other sites

In my first example you can select pre-defined text by changing the options in the lookup table.

 

As for following the second example, you still only have one lookup action. Each visibility state needs its own distinct lookup action. I don't have time to make an example, but check out the block I posted in this thread. This type of control is put on the Lookup Parameters in there. Although this block is complicated. The two lookups only operate in two states, meaning only 4 visibility states overall.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...