weight calculation lisp working in autocad 2014 but not working in 2016

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have this lisp routine that used to work in autocad 2014 but is acting up in version 2016.
It is used to calculate the weight of a wall (concrete) with an opening. (2d)
(defun c:gewicht ()
(progn
(SETQ dikte (GETREAL "\ndikte van het paneel?: (m) "))
(setq DZIN (getvar "dimzin"))
(setq ins 1)
(while
(setq ins (getpoint "\nPick Number Location: "))
(command "dimzin" "0")
(command "-hatch" ins "")
(command "area" "o" "l")
(command "erase" "l" "")
(setq AR (getvar "area"))
(setq
gewicht (strcat (rtos (* (getvar "area") dikte 0.2450) 2 2)
" kg"
)
)
(command "mtext" ins "h" 15 "j" "mc" ins gewicht "" "")
(command "dimzin" DZIN)
) ;WHILE
(princ)
)
)
So what is it doing wrong?
The 2014 version it would create a hatch based on island detection.
It would get the area from the last created element (hatch) calculate the weight.
Add the text
Delete the hatch.
version 2016: adds the hatch, but only calculates the weight of the island.
Deletes not only the hatch but the original drawing too.
So version 2014 would give me a weight of 8000+kg (20cm think concrete wall (0.2m)
Version 2016 only 2000+kg
Can someone help me find out what i did wrong?