Display full version of the post: .lsp for setting PLs elev. to zero *current entity

ebrody
08.10.2014, 23:28
(defun C:EZ (); = Current-Entity Elevation to Zero  (setvar 'Elevation 0.0)); defunThis doesn't quite do it. To put into words what I'm attempting to accomplish, I'm looking to have my current selection entities set to a zero elevation. It would be alright as well to have to select the entities. Essentially I don't want to have to open the properties window to set the elevations to zero on two poly lines I'm trying to fillet which is what prompts this issue for me. Is there a different command/variable I should be using here?Thanks for any help you can provide.

John Connor
09.10.2014, 00:40
You could use the FLATTEN command or do it using the old CHANGE command via the ELEVATION option.
John Connor2014-10-09 15:03:59

ebrody
09.10.2014, 14:54
Didn't know about that change command, and that was the ticket. Many thanks. Here's the completed .lsp for anyone else that wants it:;;  ElevationtoZero.lsp [command names: EZ];;  Set Current Entity Elevation to Zero;;  Ed Brodmarkle, October 8, 2014(defun C:EZ (/ ss cmde); = Current-Entity Elevation to Zero  (setq    ss (cond ((ssget "_I")) ((ssget))); ask User if nothing pre-selected    cmde (getvar 'cmdecho)  ); setq  (if ss    (progn      (setvar 'cmdecho 0)      (sssetfirst nil); clears pre-selection [if any] to avoid object-selection problem      (command "_change" ss ""        "_Properties" "_Elev" 0.0 ""      ); command      (setvar 'cmdecho cmde)    ); progn  ); if  (C:BYce)  (princ)); defun

Kent Cooper
10.10.2014, 15:21
... for which you will need the BYce command, one of my group of ByLayer-related commands in the attached file:
uploads/353260/ByLayer.lsp
And consider whether, for the sake of the purpose of this thread, to add this line to it:
(setvar 'elevation 0.0)

ebrody
10.10.2014, 17:56
[QUOTE=Kent Cooper]... for which you will need the BYce command, one of my group of ByLayer-related commands in the attached file:
uploads/353260/ByLayer.lsp
And consider whether, for the sake of the purpose of this thread, to add this line to it:
(setvar 'elevation 0.0)[/QUOTE]
Ah, I didn't see that I left off that modified code bit a little. As you could plainly see it's a modification of your awesome by layer commands. I tried the setvar 'elevation 0.0 and it didn't work. Not really sure why, but this command as written achieves the thing it needs to do.  Thanks for the help!

ebrody
10.10.2014, 18:02
[QUOTE=Kent Cooper]... for which you will need the BYce command, one of my group of ByLayer-related commands in the attached file:
uploads/353260/ByLayer.lsp
And consider whether, for the sake of the purpose of this thread, to add this line to it:
(setvar 'elevation 0.0)[/QUOTE]
I just added a command similar to your BYce as a EZce which is the same just injecting that elevation line. Should be aight.