- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
@leeminardi wrote:
... put (command "dimzin" 8) at the start of the program. You may also want to set it back to the default when the command is done so put (command "dimzin" 0) at the end.
I would use (setvar 'dimzin 8) instead. There was a time when you had to do it that way, or through a SETVAR command. Somewhere along the way they made System Variable names themselves usable as if they were "command names," which is easier from the Command line doing it manually, but the (setvar) function is better in coded routines. It's not only [ever-so-slightly!] shorter, but it's also faster than calling up the command processor [though the difference would not be remotely noticeable in a single-instance case like this -- probably a matter of a few milliseconds].
And if you want to reset it afterwards, it might not have been 0 to begin with -- in the US where we're pretty much stuck with Imperial units, a lot of Architects like me have it set to 3 [read about what that means in Help], and people will have various reasons to use other values. So it's better to save the current value to a variable, and reset that:
(setq dimz (getvar 'dimzin))
(setvar 'dimzin 8)
.... routine ....
(setvar 'dimzin dimz)