Jump to content

Pline Revcloud Diesel


neekcotrack

Recommended Posts

Ok I have a Diesel that I want to make any shape from a pline but I can't do it because the requires to know how many points are needed. Like below:

 

^C^C_pline;\\\\\\\revcloud;a;(* (getvar "dimscale") 0.35);o;n;

 

Is there any way to allow as many points needed till the box is close, or if I have to use lisp it will be until the user hits enter.

 

Thanks in advance for everything.

Link to comment
Share on other sites

I would draw your pline then push the button for this:

revcloud;a;(* (getvar "dimscale") 0.35);o;l;n; or write a LISP that uses the WHILE to hold the command open til you close the pline

Link to comment
Share on other sites

I would draw your pline then push the button for this:

revcloud;a;(* (getvar "dimscale") 0.35);o;l;n; or write a LISP that uses the WHILE to hold the command open til you close the pline

 

How would you go about making a lisp that will hold until you close the pline or hit enter?

 

Thanks in advance for everything.

Link to comment
Share on other sites

How would you go about making a lisp that will hold until you close the pline or hit enter?

 

Something like this:

 

(defun c:plev(/ lOb nPl)
 (setq lOb(entlast))
 (command "_.pline")
 (while(/= 0(getvar "CMDACTIVE"))
   (command pause)
   ); end while
 (if(not(equal c(setq nPl(entlast))))
     (command "_.revcloud" "_a" (* 0.35(getvar "DIMSCALE"))
       "" "_o" nPl "_n")
   ); end if
 (princ)
 ); end of c:plev

Link to comment
Share on other sites

Something like this:

 

(defun c:plev(/ lOb nPl)
 (setq lOb(entlast))
 (command "_.pline")
 (while(/= 0(getvar "CMDACTIVE"))
   (command pause)
   ); end while
 (if(not(equal c(setq nPl(entlast))))
     (command "_.revcloud" "_a" (* 0.35(getvar "DIMSCALE"))
          "" "_o" nPl "_n")
   ); end if
 (princ)
 ); end of c:plev

 

This is what I am trying to do with what you have in this order:

 

1. Make layers Revcloud2 and Revt2

(command "_.layer" "m" "Revcloud2" "c" "5" "" ""))

(command "_.layer" "m" "RevT2" "c" "145" "" ""))

 

2. Make layer Revclud2 Current

(command "_,layer" "s" "Revcloud2")

 

3. Your code

(defun c:plev(/ lOb nPl)

(setq lOb(entlast))

(command "_.pline")

(while(/= 0(getvar "CMDACTIVE"))

(command pause)

); end while

(if(not(equal c(setq nPl(entlast))))

(command "_.revcloud" "_a" (* 0.35(getvar "DIMSCALE"))

"" "_o" nPl "_n")

); end if

(princ)

); end of c:plev

 

4. Make layer Revt2 Current

(command "_,layer" "s" "Revt2")

 

5. Insert Revtri Block.

(command "_.INSERT" "revtri" "s" (getvar "dimscale") pause "0")

(command "_.attedit" "n" "y" "" "" "" "l" "1" "2" ))

 

6. End

 

I just can't figure out how to put it all together.

 

Thanks for all your help!!!

Link to comment
Share on other sites

Here is a quickie, no testing.

(defun c:MyLisp ()
 (command "_.layer" "m" "RevT2" "c" "145" "" "")
 (command "_.layer" "m" "Revcloud2" "c" "5" "" "") ; Make layer & sets Current
 [b](c:plev)  ; call the routine[/b]
 (command "_.layer" "s" "Revt2") ; Make layer Revt2 Current
 ;; Insert Revtri Block.
 (command "_.INSERT" "revtri" "s" (getvar "dimscale") pause "0")
 (command "_.attedit" "n" "y" "" "" "" "l" "1" "2")
)

(defun c:plev (/ lOb nPl)
 (setq lOb (entlast))
 (command "_.pline")
 (while (/= 0 (getvar "CMDACTIVE")) (command pause))  ; end while
 (if (not (equal c (setq nPl (entlast))))
   (command "_.revcloud" "_a" (* 0.35 (getvar "DIMSCALE")) "" "_o" nPl "_n")
 )       ; end if
 (princ)
)         ; end of c:plev

Link to comment
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
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...