Just a word of advice. In the code below, using wildcard
pattern matching on the error string is unwise and unsound.
With the advent of ActiveX, the range of strings that can
appear in the argument passed to the *error* function (or
to vl-catch-all-apply) is infinite. Make no assumptions.
ActiveX methods can raise errors with messages that contain
anything at all (including ones that can match the pattern
shown in that same code).
So, I would stongly advise others to not follow this
pattern. Use explicit string comparisons if you need to
determine precisely what the nature of error is.
And of course, this is merely my opinion. :-)
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
"Jason Piercey" wrote in message news:40e4c4b9$1_1@newsprd01...
> I see, thanks John. I wasn't aware that needed
> to be done. I'll have to chew on the vl-exit-with-error
> for a minute. Not something I've used before.
>
>
> --
> Autodesk Discussion Group Facilitator
>
>
> "John Uhden" wrote in message
> news:40e4bcd8$1_1@newsprd01...
> > You may have to add LayoutList to those functions that need to be loaded
> into a
> > separate namespace VLX...
> > (foreach item '(ACAD_COLORDLG ACAD_STRLSORT INITDIA ACAD-POP-DBMOD
> > ACAD-PUSH-DBMOD STARTAPP)
> > (vl-arx-import item)
> > )
> >
> > As to errors, you have to use a (vl-exit-with-error) to make them visible
> to the
> > document namespace...
> > (defun *error* (Error)
> > (cond
> > ((not Error))
> > ((wcmatch (strcase Error) "*QUIT*,*CANCEL*")
> > (vl-exit-with-error "\r
> ")
> > )
> > ((wcmatch (strcase Error) "*CANCEL*,*QUIT*")
> > (vl-exit-with-error (strcat "\r*ERROR*: " Error))
> > )
> > )
> > (princ)
> > )
> >
> > --
> > John Uhden, Cadlantic
> >
> > http://www.cadlantic.com
> > Sea Girt, NJ
>
>