Jump to content
tmelancon

Running Pline then executing a custom command in same lisp! Help!

Recommended Posts

tmelancon

I have written a little small command to run revision cloud on last object (i.e. rectangle, pline, circle...etc) and it works fine but I was trying to figure out a way to run that custom command after drawing my rectangle or pline. Instead of having to type the shortcut immediately after, every time.

 

Here is custom rev cloud command I am referring to, this one works flawlessly when run as a standalone after I finish drawing said object that it will be used on but I would like to combine.. see below:

(DEFUN C:RCL ()
(COMMAND "REVCLOUD" "O" "L" "")
(COMMAND "-INSERT" "REV-TRI" PAUSE "" "" "")
(COMMAND "EXPLODE" "L" "")
(COMMAND "DDEDIT" "L" "")
(PRINC))

Here is rectangle command with the attempt to run custom afterwards. It works but looks buggy and most likely written wrong. (take it easy ive been learning):

(DEFUN C:RECL ()
(COMMAND "RECTANGLE" PAUSE PAUSE)
(C:RCL)
(PRINC))

Here is my attempt at the pline one but I dont even know where to start so it allows user unlimited points then hitting "c" for close afterwards AND THEN running the custom command:

(DEFUN C:PLR ()
(command "_.PLINE")
   (coMmand pause)
(C:RCL)
(PRINC))

Share this post


Link to post
Share on other sites
tmelancon

I have appeared to solve this issue. Just took a post here to really get my brain rattling. Please copy and use for yourself if you have been wanting a simple nifty routine such as this one.

 

MAIN Cloud code:

(DEFUN C:RCL ()
(COMMAND "REVCLOUD" "O" "L" "")
(PRINC))

RECTANGLE w/ Cloud upon routine completion:

(DEFUN C:RECL ()
(COMMAND "RECTANGLE")
(while (> (getvar "CMDACTIVE") 0) (command pause))
(C:RCL)
(PRINC))

POLYLINE w/ Cloud upon routine completion:

(DEFUN C:PLR ()
(command "_.pline")
(while (> (getvar "CMDACTIVE") 0) (command pause))
(C:RCL)
(PRINC))

SPLINE w/ Cloud upon routine completion:

(DEFUN C:SPLR ()
(command "_.Spline")
(while (> (getvar "CMDACTIVE") 0) (command pause))
(C:RCL)
(PRINC))

Edited by tmelancon

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...