Jump to content

Recommended Posts

Posted

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

Posted

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

Revcloud.JPG

Posted

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

Posted

is it mean, I can not do that using macro?

Posted

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.

Posted

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;;
Posted

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 :P)

Posted

Mr. Lee

How do you write the LISP?

using a notepad, or what?

Posted

A while ago I did use Notepad, but now I use LISP Visual Editor (comes free with ACAD). Type "vlide" at command prompt.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...