- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, Im not really a programmer but can fumble my way through. Hoping I can get some help with this function I have for hatching. In the code below, I am calling a separate function which isolates the layers necessary to perform the hatch, then it prompts the user to specify the internal point. Once you click in the area it inserts the hatch and returns a prompt with the square footage. Finally it returns the layer state to what it was previous to calling the function.
I have 2 issues here: First I can only click in one area. I need to be able to click in multiple areas and have it insert the hatch into all of them, then perform the rest of the function. Second, if there is already a hatch of the type being called by the function in the drawing, calling this function again does insert the hatch into the area but then it stops. In this case, I could live with not getting the square footage prompt but I would really like the layer state to be returned to the previous state. This is not happening. If issue 1 was resolved it would probably make issue 2 moot.
Thanks for looking and for any help
(defun C:HATCH-TRAV () (HTR))
(defun HTR (/ SQFT)
(GV)
(0V)
(ppa-L-DECKISO)
(if (= (assoc 0 (tblsearch "layer" "HATCH-DECK")) nil)
(vl-cmdf "-Layer" "M" "HATCH-DECK" "L" "CONTINUOUS" "" "C" "9" "LW" ".05" "" "")
(vl-cmdf "-Layer" "S" "HATCH-DECK" "")
)
(vl-cmdf "-HATCH" "P" "URBANA_STONE_B2" "1" "0" "")
(vl-cmdf "-HATCH" PAUSE "")
(setq SQFT (GET-HATCH-AREA "URBANA_STONE_B2" "HATCH-DECK"))
(alert (strcat "TRAVERTINE : " SQFT " sqft"))
(dict-put "GRANITE" "SQFT" (ATOI SQFT))
(VL-CMDF "_HATCHTOBACK")
(SV)
(princ)
)
Solved! Go to Solution.