Linking Dynamic block lookups

Linking Dynamic block lookups

pmclean
Enthusiast Enthusiast
1,863 Views
11 Replies
Message 1 of 12

Linking Dynamic block lookups

pmclean
Enthusiast
Enthusiast

I have a dynamic block that has two different look-up tables, one to control the amount of info in the titleblock and one to control the colour of he logo. trouble is when I change one parameter the other lookup table goes to custom. I want them to work separate from each other so I have the ability to change the colour of the logo and not the titleblock info.

 

I haven't created a dynamic block in a few years so i'm stumped with this. any help would be great.

0 Likes
Accepted solutions (2)
1,864 Views
11 Replies
Replies (11)
Message 2 of 12

Libbya
Mentor
Mentor
Accepted solution

What you want to do can certainly be done, but is a bit complicated and can be a challenge to understand initially.  It's even a challenge to explain adequately.    

 

First you need to create a visibility state that corresponds to each combination of options (e.g. Plan-Color, Plan-B&W, Simple-Color and Simple-B&W).  It looks like you currently have 4 states, but the object visibility needs to be adjusted as Plan seems to be identical to Color Logo, etc...

 

Once you have the visibility states set up you need to set up a double-lookup (instructions on how to create double-lookups exist in other threads - let me know if you cannot find them).  The double lookup uses one table as input in order to determine the 'lookup property' and uses the other table as output in order to change parameter values to match the 'lookup property'.  Add an input parameter that is used on the input table of the double-lookup and have your two single lookups that are used for selection change the input parameter values.

 

Attached is a working version. 

Message 3 of 12

pmclean
Enthusiast
Enthusiast

thank-you Libbya for the explanation. I knew I was on the right track, I just get stuck on the lookup tables....everytime!!

0 Likes
Message 4 of 12

pmclean
Enthusiast
Enthusiast

Hi Libbya,

 

I have spent the day re-creating the block you sent me to make sure I understand the process and learn from it. the trouble I have now is that when I create the block and insert it to a new .dwg I see three options for the lookup table by the logo, color, B&W and custom.  Any idea what would cause that, I'm guessing i'm just doing something in the wrong order.I dont want that custom option

0 Likes
Message 5 of 12

pmclean
Enthusiast
Enthusiast

Hi Libbya,

 

I have spent the day re-creating the block you sent me to make sure I understand the process and learn from it. the trouble I have now is that when I create the block and insert it to a new .dwg I see three options for the lookup table by the logo, color, B&W and custom.  Any idea what would cause that, I'm guessing i'm just doing something in the wrong order.I dont want that custom option

0 Likes
Message 6 of 12

pmclean
Enthusiast
Enthusiast

Hi Libbya,

 

I have spent the day re-creating the block you sent me to make sure I understand the process and learn from it. the trouble I have now is that when I create the block and insert it to a new .dwg I see three options for the lookup table by the logo, color, B&W and custom.  Any idea what would cause that, I'm guessing i'm just doing something in the wrong order.I dont want that custom option

0 Likes
Message 7 of 12

Libbya
Mentor
Mentor

If the input parameters do not match a row in the table you will get the 'custom' state.  When you initially insert a block, the parameters are all inserted at their drawn location/size/rotation.  You are using the X value of the Position1 point parameter as your input property on Lookup1.  The Position1 location within the block is at X=1, Y=1.  The two X values given in the Lookup1 table are 3 and 4.  Wehn the block is initially inserted, Position1 X value = 1 which is not a value on the table and custom is the result.  

 

I would also add that the same discrepency can occur on the double lookup, especially if the double lookup is controlling the visibility state as it is in this block.  In that case, the default input parameters must match a row on the 'input' table and that row must match the default visibility state (topmost state listed in the visibility dialog).  In your attached block, the topmost visibility state is Plan-Colour.  The Plan-Color visibility state corresponds to Position1 Y=1, X=3.

 

Within block editor, move Position1 from 1,1 to 1,3 and save the block.  It will then work correctly.  

0 Likes
Message 8 of 12

pmclean
Enthusiast
Enthusiast
Accepted solution

thanks again. that did it.

0 Likes
Message 9 of 12

pmclean
Enthusiast
Enthusiast

Hi Libbya,

 

sorry to bug ya again. I'm trying to figure out what is wrong with the lookup table on the left of the logo (it will cycle thru but always stays on custom). I've checked to make sure the table and the input parameters are the same, from what I can see.

 

Should I try re-creating this block from scratch? it is a bit complex.

0 Likes
Message 10 of 12

ojuris
Advisor
Advisor

hi!

 

I add values in empty lookup table just for working and seems all is OK

 

Regards

Juris

Message 11 of 12

pmclean
Enthusiast
Enthusiast

Thank-you. I didn't realize I had BACTIONBARMODE set to 0 and therefore didn't realize there was a bridge lookup table. Once I realized that I was able to create a new one and it works great.

 

thanks for your help ojuris

0 Likes
Message 12 of 12

Libbya
Mentor
Mentor

No need to remake the block.  There are several easy solutions.  As Ojuris mentioned, you can add values to the empty table.  Another option is to delete the empty table.  A third option is to edit the lookup property side of the used table and replace 'Custom' with 'Five Lines' which will mean that when the lookup encounters a value for a parameter that is not on the table it will default to the 'Five Lines' values.  In the case of this block, with all of the values correct, the behavior is exactly the same either way but the custom value in the list is elimnated.  

 

I didn't see a reason to have the point parameters chained.  As a general rule, I only chain the parameters if necessary as chained parameters can cause their own issues.  Another general rule of mine is to always have attributes locked within dynamic blocks.  If I need to move them, I add a point move to them.  

0 Likes