Marc5 Posted July 6, 2011 Share Posted July 6, 2011 Good Morning: I want to change the display order so: I right click on the object / basic modify tools / display order / 4 options to choose from and no matter which one is selected the command line will read / Unknown Command "AI_Draworder" press F1 for help. I press F1 for help and the following is on the command line / INT unknown command "INT". Please advise as to how to get the display order to function correctly. Thanks, Marc Quote Link to comment Share on other sites More sharing options...
rkent Posted July 6, 2011 Share Posted July 6, 2011 Type DRAWORDER at the command line and see if that makes any difference. Quote Link to comment Share on other sites More sharing options...
irneb Posted July 7, 2011 Share Posted July 7, 2011 Marc, it sounds as if your setup is a bit screwy. The AI_Draworder function is a lisp defun contained in your acad20##doc.lsp file. There could be various reasons why this failed: e.g. your support paths don't point to the folder where this file is contained; the file could be deleted; the file could be edited (which it should NEVER be); etc. Also your CUI might have been changed to call that particular defun in an incorrect way. It's not a command, otherwise the defun would have been c:AI_Draworder. so the macro in the CUI should be something like ^C^C^P(AI_Draworder ..... From your description it sounds like your CUI is incorrect, the error mentions "Unknown Command". Quote Link to comment Share on other sites More sharing options...
SLW210 Posted July 7, 2011 Share Posted July 7, 2011 Check if ACDORDER.arx is being loaded. If not use APPLOAD to load. One fix is to remove AI_ from the Macro in the CUI. Quote Link to comment Share on other sites More sharing options...
irneb Posted July 7, 2011 Share Posted July 7, 2011 Not too sure if that would be the only change. E.g. the Send to Back item in my CUI is: ^C^C^P(ai_draworder "_b") ^P The reason behind it using the lisp defun is so it works whether you've got the objects selected before issuing the command or not. If you change the item to be: ^C^CDrawOrder _Back it would fail when you have nothing selected. But if you make the macro: ^C^CDrawOrder \_Back Then it will always pause for you to select items even though you've already selected them - i.e. again it would fail when you've already selected objects. The AI lisp allows for both cases. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted July 7, 2011 Share Posted July 7, 2011 Mine is ^C^C^P_ai_draworder _Back ^P The AI_ problem has been around for quite a few releases. Quote Link to comment Share on other sites More sharing options...
irneb Posted July 7, 2011 Share Posted July 7, 2011 That's because after 2008 ADesk has changed the acad20##doc.lsp file. The 2008 version looks like this: ;;; ;;; Enable Draworder to be called from a menu ;;; Checks for Pickfirst selected objects ;;; (defun ai_draworder (option / ss ) (setq m:err *error* *error* *merr*) (ai_sysvar '("cmdecho" . 0)) (if (setq ss (ssget "_I")) (command "_.draworder" option) (if (setq ss (ssget)) (command "_.draworder" ss "" option) ) ) (ai_sysvar NIL) (setq *error* m:err m:err nil) (princ) ) My 2011's acad2011doc.lsp has the same but followed by: ;;; Command version of ai_draworder to be called from the CUI ;;; so it gets properly recorded by the Action Recorder ;;; (defun c:ai_draworder () (initget "Above Under Front Back") (ai_draworder (strcat "_" (getkword))) (princ) ) That I think was done so it could be called as a normal command instead of a lisp call. Note it still just calls the "normal" ai defun. But in both cases they still surround the call with ^P to hide it from the command line. Though that also means the up arrow doesn't return the same command as per normal, that's something which irritates me a lot! I'd like to send some stuff to back, then do so with some others as well - by simply pressing Space / Enter again - but because of the ^P that can't work! 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.