All,
I have a problem getting it to retain the value that is entered for distance "dist" in the line code. Can anyone shine a light on how I could achive saving the distance similar to the fillet or offset command? Please see the lisp that I have attached below so you can see how the command runs.
Thanks,
Alex
You will probably get a better response posting this in the lisp forum:
http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130
Yes, over at the Customization Forum would be better [not a version-specific issue], but....
Take 'dist' out of the localized variables list at the top so it will be remembered after the routine is run. Personally, I would give it a variable name more specific to this routine, so that in case you run various routines that might leave variable settings, no other one that happens to use a 'dist' variable will overwrite the value. So if we call it something like BRKOUTDIST, replace this line:
(setq dist (getreal "\nEnter distance from intersection to breakout. "))
with something like this [untested]:
(initget (if BRKOUTDIST 0 1)); no Enter allowed on first use [variable doesn't yet exist]
(setq BRKOUTDIST
(cond
( (getdist ; returns nil on Enter, only when allowed above by existence of variable
(strcat
"\nDistance from intersection to breakout"
(if BRKOUTDIST (strcat " <" (rtos BRKOUTDIST) ">") ""); offer default prior value if it exists
": "
); strcat
); getdist
); User-input condition
(BRKOUTDIST); prior value on Enter [when allowed]
); cond
); setq
Using (getdist) instead of (getreal) allows the User to type a value, including one with feet and/or fractions if you use those, or pick two points on-screen.
Can't find what you're looking for? Ask the community or share your knowledge.