Thursday, April 05, 2007

Follow-up: Obj Inspect/Autosnap

Good afternoon all,
I thought I would post some follow-up information concerning the object inspect tool and the autosnap setting.

To check and/or change your autosnap value setting type "autosnap" at the command prompt.
"Enter new value for AUTOSNAP <#>:" will appear at the command line, where the "#" is an actual number dependent upon your settings. To change the value simply type in the new numeric value and hit enter.

R. Robert Bell passed me this information on the Autodesk Discussion Group concerning how the autosnap value gets changed (
"That value changes depending on what settings they've applied in the Options dialog, or on the Status bar. The value of that system variable is a total of the bit codes being set. If you don't know what bit codes are, you aren't a programmer. ;^) Only values from 0-63 will be valid in current releases. Attempts to set it to other values will either be ignored or refused."

He also posted this: "Bit 1 (value 2) is what you need on to see the tooltip. So add this to AcadDoc.lsp or your CUI's .mnl file: (setvar "AutoSnap" (boole 7 (getvar "AutoSnap") 2)) "

On AUGI I had this thread going to discuss autosnap values as well:
David Koch posted this explanation for me: "The variable is binary bit-coded so that a number of different "on-off" settings can be stored in one variable. Base 2 [binary] has two possibilities for each digit - 0 [off] or 1 [on]. With a computer, it is easy to test if a given bit is set, even if it not not terribly obvious when the number is converted to a Base 10 [decimal] number, like we are used to seeing.
0 turns off everything, as that means all bits are off.The zero bit [two raised to the zero power] is 1 when on, and turns on the AutoSnap marker.
The two's bit [two raised to the first power] is 2 when on [10 in binary], and turns on the AutoSnap tooltips.
So, 3 [11 in binary] means that both the AutoSnap marker and the AutoSnap tooltips are turned on.
The four's bit [two raised to the second power] is 4 when on [100 in binary], and turns on the AutoSnap magnet.
So, 5 [101 in binary] means that the AutoSnap marker and the AutoSnap magnet are on, and everything else is off. 6 [110] means that the AutoSnap tooltips and the AutoSnap magnet are on; 7 [111] means all of the above are on.
That carries on for each of the remaining bits:
Eight's bit [two to the third power] turns on polar tracking when set.
16's bit [two to the fourth power] turns on object snap tracking when set.
32's bit [two to the fifth power] turns on tooltips for polar tracking, object snap tracking, and Ortho mode.
From what you have posted, and as Scott mentioned, the 32 bit appears to be the magic one. Any number between 32 and 63 has the 32 bit set, so any value greater than that would support the object inspect tool tip. Besides setting the value directly in the system variable, turning polar tracking or object snap tracking on or off on the Application Status Bar, or changing any of the AutoSnap settings in the Options dialog, etc, would result in a change to the value.
If you really wanted to force this to be on, someone wiser than I with regard to the proper construction of reactor programs could help you devise one that would automatically check the value of AUTOSNAP and, if the 32 bit was not set, set it. That would still allow your users to set the other bit values as needed, and only force the display of the tooltips controlled by the 32 bit."

So there ya go folks...all the info I could round up for the time being. Hopefully this will help some of you out.

1 comment:

Brodie said...

Holy smokes! This information saved my life!