samifox Posted November 16, 2013 Share Posted November 16, 2013 Hi my 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 Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted November 17, 2013 Share Posted November 17, 2013 Try "-layiso" Quote Link to comment Share on other sites More sharing options...
samifox Posted November 17, 2013 Author Share Posted November 17, 2013 why is that? what is the different? Quote Link to comment Share on other sites More sharing options...
hmsilva Posted November 17, 2013 Share Posted November 17, 2013 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 Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted November 18, 2013 Share Posted November 18, 2013 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 [b]sat [/b](entsel)) [b][color="red"]OR [/color][/b](setq [b]sat [/b](ssget)) (command "layiso" [b]sat [/b]"") Quote Link to comment Share on other sites More sharing options...
samifox Posted November 18, 2013 Author Share Posted November 18, 2013 :oops: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.