mixing macros and lisps - macro appears to unwantedly pass ; to lisp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm attempting to mix macros and lisp code to insert blocks. I have a variable "borderscale" which (sometimes) has been set previously; if so, I'd like to use it as my scale, else I'd like to prompt the user for a scale. I've tried doing this various ways, such as:
^C^C-insert;blockname.dwg;\(if (> borderscale 0) borderscale (getreal));;0;
... which works if "borderscale" is > 0, but fails at the (getreal) stage. As best as I can make out, I think the ;'s are being passed to (getreal), rather than (getreal) actually pausing for input before processing the ;'s. I've tried this various other ways, such as replacing (getreal) with a lisp that defines "borderscale", but it fails in the same way.
I could do this with a lisp file, rather than having a macro run lisp code at the command line, but I'd rather have it self-contained in a macro if I can.
Any suggestions are appreciated.