PLEASE don't get angry with me Frank.
Could you possibly modify your VLAX routine (or create a parallel one) so
that I would not have to use LISP inside of VBA? That's why I learned VBA:
so I wouldn't have to learn Lisp!
Your EvalLispExpression arguments are still LISP and very confusing to me.
Undoubtedly, your routines are sweet, but I don't know lisp.
Could you write wrapper functions in VBA for every function I will probably
need so I could call the function using logical parameters, like YValue
rather than (caaddr (cdadar (list (caaaar (cddddr (cadadr card)))))))?
Oops! unbalanced parentheticals! 🙂
And while you don't have anything else to do, could you learn the MDT model
and break the secret code for the BRepAuto, GeAuto, and McadAuto
applications. You know I'll need wrapper functions for all those routines,
too. You just have to simplify these things for me. Ok?
Frank Oquendo wrote in message
news:3464DD9E48BEAA46EA6EDF71E2A246FD@in.WebX.maYIadrTaRb...
> One way is to use VLAX.CLS. You can get a copy in the Downloads
> section of my site. Once imported into your project, you can use code
> similar to the following. To make this work, you'll also need the
> listToVariantArray function from the VisualLISP section. Import the
> class into your project, load listToVariantArray into the drawing and
> execute (vl-load-com) at the command line (if necessary). Then run the
> Test sub.
>
> BTW, enames are converted to ObjectIds.
>
> Public Sub GetEDD(ent As AcadEntity, gCodes, eData)
>
> Dim obj As VLAX
>
> Set obj = New VLAX
> obj.EvalLispExpression "(setq lst (entget (handent """ &
> ent.Handle & """)))"
> gCodes = obj.EvalLispExpression("(listtovariantarray (mapcar 'car
> lst) vlax-vbInteger)")
> eData = obj.EvalLispExpression("(listtovariantarray (mapcar 'cdr
> lst) vlax-vbVariant)")
> obj.NullifySymbol "lst"
>
> End Sub
>
>
> Public Sub test()
>
> Dim ent As AcadEntity, pt, g, e
>
> ThisDrawing.Utility.GetEntity ent, pt, "Select object:"
> Call GetEDD(ent, g, e)
>
> For i = LBound(g) To UBound(g)
> If VarType(e(i)) >= vbArray Then
> tmp = ""
> For j = LBound(e(i)) To UBound(e(i))
> tmp = tmp & e(i)(j) & " "
> Next
> Else
> tmp = e(i)
> End If
> Debug.Print g(i) & " . " & tmp
> Next
>
> End Sub
>
>
> --
> http://www.acadx.com
>
>
> "JR Walker" wrote in message
> news:4BB8969214C3B9A0BF7B05E22E698D80@in.WebX.maYIadrTaRb...
> > Hi,
> > How does one access the dotted pairs that the ACAD2K objects do not
> have
> > properties or methods for. I am trying to read some viewport object
> > information in particular.
> > Thanks
> > JR
> >
> >
>
>