- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to do something seemingly simple but my lack of programming chops is not allowing me to get it. I need to draw a multiline with closed ends, then add a hatch to that. It works to add the hatch to the object manually after I draw it, is it possible to do this with LISP? I have tried a few different approaches none of which work. Here are some of my attempts:
(defun C:GUTTER ( )
(command "_-layer" "s" "PLUMBING" "") ;; CHANGE LAYER TO "PLUMBING"
(vl-cmdf "MLINE" "J" "Z" "S" "1" "ST" "GUTTER") ;; DRAW MULTILINE
(command "_-HATCH" ".PREVIOUS" "SOLID" "") ;; HATCH W/ SOLID
(princ)
)
(defun C:GUTTER ( / EL )
(command "_-layer" "s" "PLUMBING" "") ;; CHANGE LAYER TO "PLUMBING"
(vl-cmdf "MLINE" "J" "Z" "S" "1" "ST" "GUTTER") ;; DRAW MULTILINE
(setq EL (entlast))
(if (/= EL (entlast))
(command "_-hatch" "_S" "_L" "" "_P" "SOLID" "" "" "")
); end if
(princ)
)
(defun C:GUTTER ( )
(command "_-layer" "s" "PLUMBING" "") ;; CHANGE LAYER TO "PLUMBING"
(command
"_.MLINE" "J" "Z" "S" "1" "ST" "GUTTER"
"_.bhatch" "_advanced" "_associativity" "_yes" "" "_select" "_last" "" ""
)
(princ)
)
Thank you for reading.
Solved! Go to Solution.