Jump to content

Display Order


Marc5

Recommended Posts

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

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...