Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extrude polyline

Status
Not open for further replies.

SstennizZ

Programmer
Jan 25, 2008
7
NL
Does anybody know a lisp that does the following:
- User selects 2d polyline
- Lisp requests extrude height
- Lisp request user to select next 2d polyl and next height or exit

Found one lisp on google, but that asks for way more input than I need..
 
#EDIT#

- User selects 2d polyline
- Lisp sets Z to 0
- Lisp requests extrude height
- Lisp request user to select next 2d polyl and next height or exit
 
Are these always closed polylines? (I suppose so, otherwise couldn't extrude).

By "set to 0", set the elevation of the polyline being extruded to 0, so the extruded solid goes from 0 to "height"?

Set other polylines to 0 elevation, or keep elevation as-is?
 
I have managed to get the following lisp working (Like a charm I might add.. ;))

Code:
(defun c:3dg ( / a)
(setq clay (getvar "clayer"))

;THE LOOP MUST START HERE
 
(command "layer" "set" "Hulplijnen" nil)
  (command "_.PLINE")

      (while (= (getvar "CMDNAMES") "PLINE")

            (command pause)

      );end while

  (initget 7)
  (setq a (getdist "\nVoer hoogte dakvlak in : "))
  (COMMAND "_extrude" (entlast) "" a)
  (command "chprop" (entlast) "" "LA" "Dakplan" "")

;THE LOOP MUST END HERE
    
    (command ".-Layout" "T" "F:/Projecten/Autocad/Tekeningen/Standaardtekening 2008.dwg" "2007.001-01.01")
    (command ".-Layout" "R" "Layout1-2007.001-01.01" "Gevelaanzicht")
    (command ".-Layout" "S" "Gevelaanzicht")

      (command "_.MSPACE")
      (command "zoom" "extents")

  (setvar "perspective" 1)
  (command "_vscurrent")(command "_C")
 
  (command "._3dorbit")

(setvar "clayer" clay)
 
  (princ)
);end defun

The code like this works perfect, but only allowes the user to extrude one roof.. I cant get the loop around the poly and extrude to work. Anybody got an idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top