AutoCAD Dynamic Blocks: Multiple Visibility Look-up Table Troubleshoot

AutoCAD Dynamic Blocks: Multiple Visibility Look-up Table Troubleshoot

Jake_PCH
Advocate Advocate
350 Views
6 Replies
Message 1 of 7

AutoCAD Dynamic Blocks: Multiple Visibility Look-up Table Troubleshoot

Jake_PCH
Advocate
Advocate

Hi All,

 

I've created the attached block in an attempt to create a block with multiple 'On/Off' visibility states. I have used this process successfully before, but cannot troubleshoot why this one is not working. Any solution suggestions welcome!

0 Likes
Accepted solutions (1)
351 Views
6 Replies
Replies (6)
Message 2 of 7

Libbya
Mentor
Mentor
Accepted solution

Your block demonstrates the reason for two soapboxes of mine. 

1. Always set drawing precision (LUPREC system variable) to 8.  There is no reason for it to be lower and having it lower just allows errors. 

2. Do not use lists for parameters that will be on a double lookup. 

 

The combination causes confusion and failure of the double lookup. 

 

Your drawing precision (LUPREC system variable) is set to 3 which is so low that you cannot see the error.  Set it to 8 and you will see that your linear parameters are not drawn at an actual length of 1, but rather they are 0.99996781.  The list values are also 0 and 0.99996781 and so do not match the lookup values of 0 and 1.

 

Set the as-drawn length of the 4 parameters on your double lookup to 1 and remove the list from each of them.

Message 3 of 7

Jake_PCH
Advocate
Advocate

Hi Libbya,

 

Correcting the unit accuracy by increasing unit accuracy solved it - thank you!

However, I retained the parameter list. So, why do you suggest NOT to use lists on double look-ups?

0 Likes
Message 4 of 7

Libbya
Mentor
Mentor

There are 3 reasons I see not to use lists for the input parameters.  

1.  Creating the list is unnecessary work with no benefit.

2.  It makes it more effort to enter/edit the values in the lookup table.

3.  If the precision is not set to the max and your list includes values that are not exact, then when you select from the list when entering values into the lookup table, the table will use the ROUNDED value and not the inexact value and the lookup will fail.

Message 5 of 7

Brock_Olly
Collaborator
Collaborator

Hi Libbya,

This is very interesting.
If my LUPREC variable is set to 4 and I draw a line of 10 and then I change it to 8, it should still be 10,00000000 right?
How did Jake's line end up being 0.99996781?

Personally my luprec is set to 4 (I didn't know it was a thing) but when I changed it to 8 I could see a *lot* of dimensions that were similarly wrong, slightly less or more.
 

Message 6 of 7

Jake_PCH
Advocate
Advocate

@Brock_Olly well done for identifying and communicating this anomaly - indeed very interesting.

0 Likes
Message 7 of 7

Libbya
Mentor
Mentor

The LUPREC setting does not change the actual size of any linework.  It just hides/shows inaccuracies that have been introduced by inaccurate drafting.  If you draw a line by entering a value (e.g. 10), then luprec does not enter into it (the line will be 10 units long regardless of the luprec setting).  The same is true for entering a value into an object's properties.  However, if you make an error in some way you will not know that it is off.  Obviously Jake did something when creating those parameters that was inaccurate.  I don't know what method he used during creation of the parameters so I can't comment on any specifics.  

 

If you have changed your luprec setting and have now noticed inaccuracies in your drawings, then IMO you should adjust your drafting methods so that you are no longer introducing those inaccuracies.  

 

Unfortunately, the default setting for LUPREC is 4 and IMO it makes no sense to have it set less than 8.