I have the following code that works great in ACADMAP2010, but when I run this on vanilla ACAD2010 it bombs. It fails on the HATCH part of the code.
(defun C:HPP ( / ss n ssss)
(vl-load-com)
(command "_undo" "_g")
(setq ss (ssget "X" '((0 . "LWPOLYLINE")(8 . "0")(70 . 1))));0=Type , 8=Layer Name , 70=lypolylines closed only
(if (= ss nil)
(alert "LwPolylines are not on the Correct LAYER!")
)
(if ss
(repeat (setq n (sslength ss))
(setq n (1- n))
(command "_.hatch" "HONEY" "140" "" (ssname ss n) "") )
)
(setq ssss (ssget "X" '((0 . "HATCH"))))
(command ".chprop" ssss "" "c" "yellow" "")
(command "._undo" "_end")
(princ)
)
So I tried to change it to the following and I get nothing.
(command ".-hatch" "p" "HONEY" "140" "s" (ssname ss n) "")
Could one of you guys test this out and let me know where I am going wrong?
Thanks,