@per_hellstrom wrote:
....
I need help to set the default offset distance to 200 ....
And remain the last used value when I use the lisp again.
It seems a little odd to me to use (getcfg) and deal with the offset distance as a text string. It's a number, and can be handled that way directly if within the same drawing-editing session.
When you say "when I use the lisp again," if you mean again within the same editing session, then it can be done with a simple global variable.
If you mean when you use it again in a different drawing, or after closing a drawing and opening it again later [or even after closing AutoCAD]. then maybe the (getcfg) approach is okay, though I think I would use an Environment Variable [which also has to store it as a text string].
Either way, I think it can be done with fewer steps than in your posted code.
Which "again" do you intend?
Kent Cooper, AIA