neekcotrack Posted September 5, 2008 Share Posted September 5, 2008 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. Quote Link to comment Share on other sites More sharing options...
CmdrDuh Posted September 5, 2008 Share Posted September 5, 2008 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 Quote Link to comment Share on other sites More sharing options...
neekcotrack Posted September 8, 2008 Author Share Posted September 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
ASMI Posted September 8, 2008 Share Posted September 8, 2008 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 Quote Link to comment Share on other sites More sharing options...
neekcotrack Posted September 8, 2008 Author Share Posted September 8, 2008 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!!! Quote Link to comment Share on other sites More sharing options...
neekcotrack Posted September 10, 2008 Author Share Posted September 10, 2008 Bump bump !!!! Quote Link to comment Share on other sites More sharing options...
CAB Posted September 10, 2008 Share Posted September 10, 2008 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 Quote Link to comment Share on other sites More sharing options...
neekcotrack Posted September 10, 2008 Author Share Posted September 10, 2008 its coming up with no function definition on the plev command Quote Link to comment Share on other sites More sharing options...
CAB Posted September 10, 2008 Share Posted September 10, 2008 See the code change above in bold type. Quote Link to comment Share on other sites More sharing options...
neekcotrack Posted September 10, 2008 Author Share Posted September 10, 2008 See the code change above in bold type. Thanks I got it to work. I changed that and it worked. Thanks again CAB. Quote Link to comment Share on other sites More sharing options...
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.