Author Topic: visual lisp crash calling (command "draworder")  (Read 8926 times)

0 Members and 1 Guest are viewing this topic.

SIDESHOWBOB

  • Guest
Re: visual lisp crash calling (command "draworder")
« Reply #15 on: June 28, 2012, 10:34:14 AM »
No, it just says ; error: bad argument type: VLA-OBJECT

I tried loading your code, and modifying your catch all apply function as follows:
Code - Auto/Visual Lisp: [Select]
  1. (defun LM:CatchApply ( _function _params / result )
  2.     (if (not (vl-catch-all-error-p (setq result (vl-catch-all-apply _function _params))))
  3.         result
  4.         (progn (princ result) (princ))
  5.     )
  6. )

...same result

SIDESHOWBOB

  • Guest
Re: visual lisp crash calling (command "draworder")
« Reply #16 on: June 28, 2012, 10:37:07 AM »
And yes, dict receives a value <VLA-OBJECT IAcadDictionary 0bbc89a4>

SIDESHOWBOB

  • Guest
Re: visual lisp crash calling (command "draworder")
« Reply #17 on: June 28, 2012, 10:39:25 AM »
Test with your routines:

Code - Auto/Visual Lisp: [Select]
  1. #<%catch-all-apply-error%>
  2. ; error: bad argument type: VLA-OBJECT

LE3

  • Guest
Re: visual lisp crash calling (command "draworder")
« Reply #18 on: June 28, 2012, 11:09:44 AM »
might want to give it a try to this function:  VxSetDrawOrder - from one of the old masters in the lispy world...
here:
http://www.menziengineering.ch/Downloads/Download.htm

SIDESHOWBOB

  • Guest
Re: visual lisp crash calling (command "draworder")
« Reply #19 on: June 29, 2012, 10:50:37 AM »
might want to give it a try to this function:  VxSetDrawOrder - from one of the old masters in the lispy world...
here:
http://www.menziengineering.ch/Downloads/Download.htm

Interesting - the same command fails
Code - Auto/Visual Lisp: [Select]
  1. (vla-AddObject ExtDic "ACAD_SORTENTS" "AcDbSortentsTable")
but with a different error message
Code - Auto/Visual Lisp: [Select]
  1. error: Automation Error. AcRxClassName entry is not in the system registry


irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: visual lisp crash calling (command "draworder")
« Reply #20 on: July 02, 2012, 02:28:06 AM »
Which version of ACad are you using? Or do you use some clone instead? It sounds as if the ActiveX libraries weren't registered on your system. If ACad see if a repair install solves this.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: visual lisp crash calling (command "draworder")
« Reply #21 on: July 02, 2012, 07:35:34 AM »
'VxSetDrawOrder' is tested with all Acad versions 2k5 - 2k12,
and 2k13 also... 8-)

Cheers
« Last Edit: July 02, 2012, 08:06:06 AM by Jürg Menzi »
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

SIDESHOWBOB

  • Guest
Re: visual lisp crash calling (command "draworder")
« Reply #22 on: July 02, 2012, 08:30:07 AM »
Must be my version of autocad then.  It's a direct link autodesk sent me after I complained the 2010 download was broken.

owenwengerd

  • Bull Frog
  • Posts: 451
Re: visual lisp crash calling (command "draworder")
« Reply #23 on: July 02, 2012, 10:28:26 AM »
The error means that the clas sname is not registered, which means the .arx module is not loaded. Does the DRAWORDER command work? If so, use it to demand load the module before attempting to use it. If not, check your DEMANDLOAD system variable setting.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: visual lisp crash calling (command "draworder")
« Reply #24 on: July 02, 2012, 11:57:36 AM »
The error means that the clas sname is not registered, which means the .arx module is not loaded. Does the DRAWORDER command work? If so, use it to demand load the module before attempting to use it. If not, check your DEMANDLOAD system variable setting.

1+

Otherwise, call this in your routine:

Code: [Select]
(if (not (member "acdorder.arx" (arx)))
    (arxload "acdorder.arx" nil)
)