asos2000 Posted December 21, 2008 Posted December 21, 2008 i created a CUI macro to draw a revcloud ^C^Cpline;revcloud;arc;500;500;object;last;; the macro draws the pline and dont apply the revcloud command Quote
asos2000 Posted December 21, 2008 Author Posted December 21, 2008 I am creating a CUI for the company I working in What I want is, the user draws lines (pline) then those lines converted to revcloud . I want to use the arc lengh as a standard for all user. Any suggestions Quote
Lee Mac Posted December 21, 2008 Posted December 21, 2008 When constructing a rev-cloud from a polyline, the polyline must be closed. I had two mins so this LISP will accomplish the same thing: ; Polyline Revcloud by Lee McDonnell 21/12/2008 (defun c:prev (/ *error* l1 l2) (defun *error* (msg) (setvar "cmdecho" 1) (if (= msg "") (princ "\nFunction Complete.") (princ "\nError or Esc Pressed!") ) ;_ end if (princ) ) ;_ end defun (setvar "cmdecho" 0) (prompt "\nConstruct Polyline.") (command "_pline") (while (> (getvar "cmdactive") 0) (command pause)) (setq l1 (entlast)) (command "_pedit" l1 "c" "") (setq l2 (entlast)) (prompt "\nReverse Cloud Direction? [Yes/No]: ") (command "_revcloud" "o" l2 pause) (*error* "") (princ) ) ;_ end defun Quote
asos2000 Posted December 21, 2008 Author Posted December 21, 2008 is it mean, I can not do that using macro? Quote
Lee Mac Posted December 21, 2008 Posted December 21, 2008 Well, lets just say that it would be awkward to use a macro to accomplish the same task, as the macro would have to make sure that the polyline was closed before performing the conversion to a rev cloud - I would personally opt for LISP. Quote
asos2000 Posted December 21, 2008 Author Posted December 21, 2008 Personally I like LISP but when dealing with more than 60 PCs and load the lisp on all of that. In that case I prefer to make a CUI button (the menu is shared on server) we can use that to be sure the pline is closed ^C^Cpline;pe;last;close;;revcloud;arc;500;500;object;last;; Quote
Lee Mac Posted December 21, 2008 Posted December 21, 2008 Ok, no probs - just providing you with another option. Quote
Lee Mac Posted December 21, 2008 Posted December 21, 2008 Maybe for existing polyline: ; Polyline Rev-cloud by Lee McDonnell (Polyline Selection) - 21/12/2008 (defun c:prev2 (/ *error* ent ent1) (defun *error* (msg) (setvar "cmdecho" 1) (if (= msg "") (princ "\nFunction Complete.") (princ "\nError or Esc Pressed!") ) ;_ end if (princ) ) ;_ end defun (setvar "cmdecho" 0) (while (setq ent (entsel "\nSelect Polyline: ")) (command "_pedit" ent "c" "") (setq ent1 (entlast)) (prompt "\nReverse Direction of Cloud? [Yes/No] <No> : ") (command "_revcloud" "O" ent1 pause) ) ;_ end while (*error* "") (princ) ) ;_ end defun (got a bit carried away ) Quote
asos2000 Posted December 21, 2008 Author Posted December 21, 2008 Mr. Lee How do you write the LISP? using a notepad, or what? Quote
Lee Mac Posted December 21, 2008 Posted December 21, 2008 A while ago I did use Notepad, but now I use LISP Visual Editor (comes free with ACAD). Type "vlide" at command prompt. 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.