The predicate can be trusted. The object has an exposed explode method.
vlax-method-applicable-p returns true if the object has an exposed method
with the name you pass it. The minsert block object has an explode method.
You can call that method and the object will respond. In this case the
object returns an exception telling you it cannot be exploded. This is not
what you wanted but it is as designed.
It doesn't matter which automation controller you use VLISP, VBA, Delphi,
VB, C++, etc. Each one will show you the Explode method exists for
minserted block objects and each one will return an exception when that
method is called.
You can code around the exception using vl-catch-all-apply.
(setq im (vlax-ename->vla-object (car (entsel))))
(if (vlax-method-applicable-p im 'Explode)
(progn
(setq retval (vl-catch-all-apply 'vlax-invoke-method (list im
'Explode)))
(if (vl-catch-all-error-p retval)
(list "Explode" im (vl-catch-all-error-message retval))))
)
The documentation should point out that Explode does not apply for this
object. I don't know if the documentation has been updated in 2002 but I
can tell you that the minsert object still exposes an explode method and
still returns an exception if that method is called.
Steve Mighetto
"R. Togores"
wrote in message
news:5312FF67E7C4C8DBA9F78B38D1606375@in.WebX.maYIadrTaRb...
> Definitely vlax-method-applicable-p is a sorry contraption.
> ¿What's the use of a predicate if it you can't trust it?
> Other example: GetBoundingBox on rays and xlines,
> vlax-method-applicable-p will also return True on this objects
> when clearly it is not applicable.
> Although in this case the method should really be applicable and could
> return 1.#INF,
> as Reini Urban once suggested, which is the (also undocumented)
> representation of
> INFINITE (real number overflow)...
> (try some real big number like 1.0e+310, you'll get 1.#INF)
> Reinaldo
>
> "Bobby Jones" escribió en el mensaje
> news:FE80702D9DFD416F3A3C6CE47E7A87EF@in.WebX.maYIadrTaRb...
> > I agree. I said maybe a bug, because the vlax-method-applicable-p
should
> > return nil on a minsert instead of T. But it's definitely a shortcoming
> of
> > the help files to list the explode method as available to a minsert,
when
> > clearly it is not. Does anyone know if this is fixed in TuTu?
> > --
> > Bobby C. Jones
> >
> > "Art Cooney" wrote in message
> > news:C130F472F015CE870329AE48900162CB@in.WebX.maYIadrTaRb...
> > > MInserts have never been able to be exploded, so this is as designed
> > > behavior.
> >
> >
> >
>
>