Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need some extra Lisp help

1 REPLY 1
SOLVED
Reply
Message 1 of 2
irishrandy26
216 Views, 1 Reply

Need some extra Lisp help

I hate to keep bugging you guys but I am now wanting to tweak this command now that I have had a little bit of time to mess around with it. I am wanting to add a layer for this to automatically be put on. My question is where do I input the command line for the layer in the lisp? I do know what to type, just unsure of where to place it.

 

Here is the lisp I am using;

 

(defun C:AD (/ pt1 pt2 ht lin1 lin2 ldata)
(setq
pt1 (getpoint "\nSelect one end of floor line: ")
pt2 (getpoint pt1 "\nOther end: ")
ht (getdist pt1 "\nRoom height: ")
); setq
(command "_line" "_none" pt1 "_none" pt2 "")
(setq lin1 (entlast))
(command "_.offset" ht "@" (getpoint "\nSide on which to build box: ") "")
(setq lin2 (entlast))
(command
"_.pline"
"_none" pt1 "_width" 0 0 "_none" pt2
"_none" (cdr (assoc 11 (setq ldata (entget lin2))))
"_none" (cdr (assoc 10 ldata))
"_close"
"_.erase" lin1 lin2 ""
); command
); defun

 

 

 

And what I want to add is;

 

(command "-layer" "s" "MP-VPORT")

 

Also I would like to get the area of the "box" I had just created, but I want to put it in a "dtext" and be able to select where I want to place the text.

1 REPLY 1
Message 2 of 2
Kent1Cooper
in reply to: irishrandy26

[See my Reply on the "More lisp issues" thread.]

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost