TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: 2e4lite on May 17, 2014, 10:23:19 PM
-
...
(setq ent (ssname ss n))
...
(command "chprop" ent "" "la" lay_chname "")
It runs successfully in cad2004,but in cad2009, prompting Invalid option keyword,why?
-
Perhaps the command prompt sequence has changed ... if all other things are equal.
-
If I operate step by step in the command line by this sequence,It is also successful
-
Try:
(command "_.chprop" ent "" "_layer" lay_chname "")
-
Thanks Kerry and Lee Mac !
-
...
(setq ent (ssname ss n))
...
(command "chprop" ent "" "la" lay_chname "")
It runs successfully in cad2004,but in cad2009, prompting Invalid option keyword,why?
Try:
(command "_.chprop" ent "" "_layer" lay_chname "")
Moral of the story ... never use shortcuts for options when calling them from Lisp (use the full option's name). You can be nearly 100% sure something will change again if any new option is added in a later version, and the chance that that "something" is the shortcut is very high - while the name is much less probable.