jweber Posted November 17, 2017 Posted November 17, 2017 I understand that the revcloud command relies on a system variable in conjunction with a drawing's current annotation scale to try and scale the arc length appropriately, but it's always wrong. I wrote a lisp to make it the arc length constant, but I'm running into an issue with (command "revcloud"). Command: (command "revcloud" )revcloud Minimum arc length: 2'-0" Maximum arc length: 6'-0" Style: Normal Type: Freehand Specify start point or [Arc length/Object/Style] : *Cancel* Command: REVCLOUD Minimum arc length: 2'-0" Maximum arc length: 6'-0" Style: Normal Type: Freehand Specify first point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] : *Cancel* Why are the options different? And how can I get all the options from within lisp? Here's my w.i.p. lisp: (defun c:RC1 (/) (setq TAB (getvar "TILEMODE")) (cond ((= TAB 0) (command "revcloud" "a" ".25" ".25") (while (> (getvar 'CmdActive) 0) (command pause)) ) ((= TAB 1) (command "revcloud" "a" "24" "24") (while (> (getvar 'CmdActive) 0) (command pause)) ) ) ) Quote
ronjonp Posted November 17, 2017 Posted November 17, 2017 That is strange. Here is a way to get all the prompts via lisp: (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_.revcloud ") If you use dimscale or something to set these numbers, it could be a multiplier like so .. just food for thought. (defun c:foo (/ _dimscale doc n) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (defun _dimscale (n) (* n (cond ;;in viewport ((and (zerop (getvar 'tilemode)) (> (getvar 'cvport) 1)) (last (trans '(0 0 1.0) 3 2))) ;;in pspace or dimscale is 0 ((or (= (getvar 'cvport) 1) (zerop (getvar 'dimscale))) 1.) ;;in modelspace ((getvar 'dimscale)) ) ) ) (setq n (vl-princ-to-string (_dimscale 0.25))) (vla-sendcommand doc (strcat "_.revcloud a " n " " n " ")) (princ) ) (vl-load-com) 1 Quote
jweber Posted November 17, 2017 Author Posted November 17, 2017 That is strange. Here is a way to get all the prompts via lisp: (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_.revcloud ") Thanks ronjonp! I've never come across this before, but assume it has something to do with the recent (2016 or so) update autocad did with the revcloud command. Thanks for your workaround and suggestion using dimscale! Quote
jweber Posted November 17, 2017 Author Posted November 17, 2017 I didn't even realize that was a thing. Thanks for the knowledge! Quote
ronjonp Posted November 20, 2017 Posted November 20, 2017 Thanks ronjonp! I've never come across this before, but assume it has something to do with the recent (2016 or so) update autocad did with the revcloud command. Thanks for your workaround and suggestion using dimscale! Glad to help Quote
gricatti Posted May 13, 2023 Posted May 13, 2023 (edited) On 11/18/2017 at 12:03 AM, Grrr said: Try using initcommandversion. Bonjour, initcommandversion 2 permet d'utiliser (command "_revcloud" pt1 pt2) dans Editeur Visual Lisp Quand j'exécute fichier windows .BAT avec accoreconsole (Autocad 2023) et fichier .scr; j'obtiens: NIL erreur: no function definition:nil Why in visual lisp it work? Not working from .scr file? WORKING: My visual lisp code: Not Working .SCR Edited May 13, 2023 by gricatti 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.