thalon Posted August 14, 2008 Posted August 14, 2008 Hi All, I am tring to create a macro (a lisp might be ok too) to insert Mtext object with justification set to Bottom Left, Height 0.09375, and Width 0. This is what I'm starting with (button on a pallet)... ^C^C_mtext \ "Justify" "BL" "Height" "0.09375" "Width" "0" the \ allows me to pick an insertion point, but then I get an error saying "2D point or option keyword required" if i type it all in on the command line as the command is being run there are no problems. How do you send the keyword to the command in the macro? Any help is greatly appriciated. I'm running Vanilla AutoCAD 2008 SP1 Quote
rkmcswain Posted August 15, 2008 Posted August 15, 2008 For a macro, just concatenate each prompt as you would type it at the command line. Use a ";" for enter so it's visible in the macro. I prefer lisp since it's easier to debug. Here is a sample. ;;; (command "._mtext" (getpoint "\nSelect BL point") "_J" "_BL" "_H" "0.09375" "_W" "0.0") ;;; ;;; ;;; optional way if you want to use the point for something else (setq pt1 (getpoint "\nSelect BL point")) (command "._mtext" pt1 "_J" "_BL" "_H" "0.09375" "_W" "0.0") Quote
thalon Posted August 15, 2008 Author Posted August 15, 2008 I figures it out this morning. My first attempt I had a space following the \, and extra spaces all over the place in the rest of the macro. Simply removing these spaces fixed it, and it works from the button just the way I want it to!! The corrected macro... ^C^C_mtext \J;BL;H;0.09375;W;0; Thanks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.