Constantin,
I just didn't know if you had used it before or not, so I thought it was
worth a mention. I have no problem with you telling people one way, I just
like having a variety.
--
Tim
"A blind man lets nothing block his vision."
"Constantin" wrote in message
news:5333010@discussion.autodesk.com...
Hi Tim,
I didn't want to emphasize on the use of the blackboard variables, but
rather on the idea of having these variables available in all drawings.
Maybe I am wrong, but the reason I preach vl-bb-set and vl-bb-ref each time,
is because I think that for most people asking this kind of stuff on this
NG, the idea of propagating a variable over all documents is much more
abstract and difficult to "visualize" than the idea of putting something
somewhere and getting it later from there.
Regards,
Constantin
"T.Willey" a écrit dans le message de news:
5332967@discussion.autodesk.com...
You could also use (vl-propagate VarName) to share a variable with all
drawings. Then you can just use the variable without haveing to grab it
from the back board.
FYI...
--
Tim
"A blind man lets nothing block his vision."
"Constantin" wrote in message
news:5332976@discussion.autodesk.com...
Hi Kent,
IMHO, the code you are proposing can be improved by using vl-bb-set and
vl-bb-ref [something like (vl-bbset 'ofsdist1 ofsdistprompt) and (vl-bb-ref
'ofsdist1)], instead of using(setq ...). This way the variables ofsdist1 to
ofsdist4 will be available to all documents (existing and new) for the
active AutoCAD session.
Constantin
"Kent Cooper" a écrit dans le message de
news: 5332941@discussion.autodesk.com...
Here's a slightly shorter way of doing it. As in Joe's, you type O1, O2,
etc. for each one, but this only has to spell out the prompt once in each,
and doesn't set OFFSETDIST first and then accept it in the (command), but
rather just puts the value in there inside the command. Also, mine uses
(getdist) instead of (getreal), so you can pick the distance with two points
on-screen instead of always having to type it, if you want. Gile's doesn't
cover multiple values,
and shouldn't localize the variable (because then you
have to establish it again the next time), and doesn't allow for offsetting
lots of things within one operation, and has a fixed default instead of
retaining the new default after the user has established one.
You could even have this save the four values so they'd still be there the
next time you open the drawing, if you have enough USERRx system variables
available to do it.
--
Kent Cooper
"ADK" wrote...
Is
there a lisp routine that can retain multiple offset distances?
Example: have the offset command have multiple start commands: O1, O2, O3,
O4
When you type O1 it prompts (command prompt) you for a offset distance or
return to except the current default in brackets.
When you type O2 it prompts (command prompt) you for a offset distance or
return to except the current default in brackets.
etc.
Many times I have need to offset things say 2 3/4" and others 1 1/2"
...sometimes toggling back an
d forth but keying in the new distance each
time it changes.
Thanks