Autodesk Technology Managers Forum
Share your knowledge, ask questions, and engage with fellow CAD/BIM Managers.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help on a LIsp routine

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
196 Views, 5 Replies

Need help on a LIsp routine

I was wondering if anyone has a routine which will set all the wall bases to
zero elevation. Not flatten the wall but reset and assure that there is no
deviation in base elevation above 'Z'.

Can anyone help a tired old elf out?
--
*<];-)}

CAD Manager
Autodesk Architectural Desktop Certified Expert
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

When you say bases, do you mean the floor line or do you mean the elevation
of the wall object? I have one that will do the floor lines already.


"Santa CAD" wrote in message
news:5125335@discussion.autodesk.com...
I was wondering if anyone has a routine which will set all the wall bases to
zero elevation. Not flatten the wall but reset and assure that there is no
deviation in base elevation above 'Z'.

Can anyone help a tired old elf out?
--
*<];-)}

CAD Manager
Autodesk Architectural Desktop Certified Expert
Message 3 of 6
Anonymous
in reply to: Anonymous

Yes. The floor lines.

I still want the walls to have height, I just want to be secure that all the
wall's bases have a zero 'Z'.

TIA

--
*<] 🙂 }

CAD Systems Manager
Autodesk Architectural Desktop Certified Expert

"Kevin J. Lazarowski" wrote in message
news:5125346@discussion.autodesk.com...
When you say bases, do you mean the floor line or do you mean the elevation
of the wall object? I have one that will do the floor lines already.


"Santa CAD" wrote in message
news:5125335@discussion.autodesk.com...
I was wondering if anyone has a routine which will set all the wall bases to
zero elevation. Not flatten the wall but reset and assure that there is no
deviation in base elevation above 'Z'.

Can anyone help a tired old elf out?
--
*<];-)}

CAD Manager
Autodesk Architectural Desktop Certified Expert
Message 4 of 6
Anonymous
in reply to: Anonymous

(defun c:fls()
(princ "\nSelect walls to adjust floorlines")
(setq fls-1 (ssget))
(setq fls-2 (getreal "\nEnter soffit height"))
(command "floorline" "r" fls-1 "" "o" fls-1 "" fls-2 "")
)

This routine prompts for a height in inches and sets the floor line to that
height (above). To automatically set the floor line to 0", replace the fls-2
with "0" (below).

(defun c:fls()
(princ "\nSelect walls to adjust floorlines")
(setq fls-1 (ssget))
;(setq fls-2 (getreal "\nEnter soffit height"))
(command "floorline" "r" fls-1 "" "o" fls-1 "" "0" "")
)
Message 5 of 6
Anonymous
in reply to: Anonymous


Thank you for the routine, and now I understand
your earlier question. 

 

You were right, I meant 'elevation'  sorry for
the confusion, and thanks for trying to help me out.

 

I want a routine which will set a wall's
elevation to zero, while maintaining its height.

 

TIA


--
*<] 🙂 }

 

CAD Systems Manager
Autodesk Architectural
Desktop Certified Expert

 

(defun c:fls()
  (princ
"\nSelect walls to adjust floorlines")
  (setq fls-1 (ssget))
 
(setq fls-2 (getreal "\nEnter soffit height"))
  (command "floorline"
"r" fls-1 "" "o" fls-1 "" fls-2 "")
  )

This routine prompts for
a height in inches and sets the floor line to that
height (above). To
automatically set the floor line to 0", replace the fls-2
with "0"
(below).

(defun c:fls()
  (princ "\nSelect walls to adjust
floorlines")
  (setq fls-1 (ssget))
  ;(setq fls-2 (getreal
"\nEnter soffit height"))
  (command "floorline" "r" fls-1 "" "o" fls-1
"" "0" "")
  )
Message 6 of 6
Anonymous
in reply to: Anonymous

I whipped this on up real quick this morning, it would be useful to have
around. I haven't tested it a great deal, so use it on a couple of pratice
files first to make sure it doesn't interfere with tagging and such. All
this does is replace the "Z" coordinate with a "0.0"

(defun c:z0 ()
(setq z0-1 (ssget "x" '((0 . "AEC_WALL"))))
(if (= z0-1 nil)(progn (princ "\nNo wall objects found.")(exit)))
(setq z0-2 0)
(while (> (sslength z0-1) z0-2)
(setq z0-3 (entget (ssname z0-1 z0-2) '("*")))
(setq z0-4x (car (cdr (assoc 10 z0-3))) z0-4y (cadr (cdr (assoc 10
z0-3))) z0-4z 0.0)
(setq z0-4 (list 10 z0-4x z0-4y z0-4z))
(setq z0-5 (subst z0-4 (assoc 10 z0-3) z0-3))
(entmod z0-5)
(setq z0-2 (1+ z0-2))
)
)

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

Post to forums  

Administrator Productivity


Autodesk Design & Make Report