code stop executing in (comma
Himy program stop when executing (command) function. what im doing wrong?
(defun unlockAllLayers () (princ "/nunlock all layers") T )(defun deleteEntityLimit (units) (princ (strcat "/nDelete line or poly if length is less than " (rtos units))) T )(defun setIsolateMode (mode)(if (= mode 0)(progn (princ "/nIsolate mode was set to Off") (command "layiso" "S" "O" "" )))(if (= mode 1)(progn (princ "/nIsolate mode was set to Lock and fade") (command "layiso" "S" "L" "" ))) T)(defun C:TEST (/ q yn) (if (unlockAllLayers) (if (setIsolateMode 1) (progn(setq q (getvar 'qaflags))(princ "/nIsolating...")(command "layiso" "")(setvar 'qaflags q)(initget "Yes No")(if (setq yn (getString "Do you want to proceed? Yes/No"))(if (= yn "Y") (alert "Yes") (alert "No"))) ) ) ))
Thanks
Shay Try "-layiso" why is that? what is the different? samifox,
this is not not generating error but it is unnecessary
(setq q (getvar 'qaflags));; store the qaflags value to the q variable(setvar 'qaflags q);; sets the q value to the qaflags sysvar ???
this is generating the error
(command "layiso" "");; you must supply the "layiso" command with a selection set (ssget) or an ename (car (entsel))
HTH
Henrique Sorry Shay,
I read this post on my cell phone, and didnt check your code completely....
You didnt mentioned any object set or selection set anywhere in your code, you need to pass some selection set,
e.g.
(setq sat (entsel)) OR (setq sat (ssget))(command "layiso" sat "") :oops:
页:
[1]