PDA

View Full Version : Wall


vipin_nair
2008-02-27, 10:52 AM
Hi,

I have a routine that makes wall's in drawing. My problem is that every time I had to explode that wall to insert doors and windows. I want to explode that wall automatically after end's of wall. Is it possible through a programme. Thank you.

Eg:
(defun c:w23()
(setq cm(getvar "cmdecho"))
(setvar "cmdecho" 0)
;;; (setq clay(getvar "clayer"))
(setq cclr (getvar "cecolor"))
(command "layer" "m" "wall" "c" "cyan" "" "")
(command "mline" "s" "230")
;;; (command "layer" "m" "0" "c" "white" "" "")
;;; (setvar "clayer" clay)
(setvar "cmdecho" cm)
)

Moderator Note:
How to use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)

Lions60
2008-02-27, 06:04 PM
You might give this a try i ahve not checked it to see if it works or not.


(defun c:w23()
(setq cm(getvar "cmdecho"))
(setvar "cmdecho" 0)
;;; (setq clay(getvar "clayer"))
(setq cclr (getvar "cecolor"))
(command "layer" "m" "wall" "c" "cyan" "" "")
(command "mline" "s" "230")
(setq ent (entlast))
(command "._explode" entlast "")
;;; (command "layer" "m" "0" "c" "white" "" "")
;;; (setvar "clayer" clay)
(setvar "cmdecho" cm)
)

vipin_nair
2008-02-28, 08:17 AM
Hi,

It is not working. It shows an error " point or option keyword required". Thankyou.

Lions60
2008-02-28, 02:17 PM
Where in the above coed are you actually drawing the wall. I see where your setting the mline scale, but your never actually drawing the wall. The code i placed (which is highlighted in red) should be placed directly after the line of code where you draw the wall. I'm still not sure if it will work then but it may.