Jump in, and welcome to the LISP forum.
Actually, Microsoft decided several years ago to euthanize VBA, and vendors such as Adesk have little choice but to conform to Microsoft's policy.
Points have x,y,z coordinates, so if the reference plane has z=0, determining how far a point is from this plane reduces to examining the z coordinate.
You should first become familiar with (entget) function.
Classic AutoLISP via (entget) & (entmod) are intimately related to DXF.
So, the DXF reference is your friend. DXF group codes are identical to those returned by (entget).
For example, the DXF reference for a POINT entity gives:
(partial listing)
100
Subclass marker (AcDbPoint)
10
Point location (in WCS)
DXF: X value; APP: 3D point
20, 30
DXF: Y and Z values of point location (in WCS)
If you create a POINT entity:
Command: point
Current point modes: PDMODE=34 PDSIZE=0'-0 1/2"
Specify a point:
Then query the entity via AutoLISP:
Command: (entget(entlast))
((-1 . <Entity name: 7c7c7280>) (0 . "POINT") (330 . <Entity name: 78760e60>)
(5 . "15E38") (100 . "AcDbEntity") (67 . 1) (410 . "Mezzanine Plan") (8 .
"ANNOBJ") (100 . "AcDbPoint") (10 7.51955 1.38385 0.0) (210 0.0 0.0 1.0) (50 .
0.0))
You will see that:
(10 7.51955 1.38385 0.0)
corresponds to the POINT's coordinates
Command: list
Select objects: last
1 found
Select objects:
POINT Layer: "ANNOBJ"
Space: Paper space
Layout: Mezzanine Plan
Handle = 15e38
at point, X=0'-7 33/64" Y=0'-1 25/64" Z= 0'-0"
You can also convert enames to vla-objects and manipulate them using the object model with which you are familiar:
Command: (setq obj (vlax-ename->vla-object (entlast)))
#<VLA-OBJECT IAcadPoint 1d4b1a84>
Command: (load "dump")
DUMP
Command: (dump obj)
; IAcadPoint: AutoCAD Point Interface
; Property values:
; Application (RO) = #<VLA-OBJECT IAcadApplication 00d74d3c>
; Coordinates = (7.51955 1.38385 0.0)
; Document (RO) = #<VLA-OBJECT IAcadDocument 01e4c750>
; Handle (RO) = "15E38"
; HasExtensionDictionary (RO) = 0
; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 2036c774>
; Layer = "ANNOBJ"
; Linetype = "BYLAYER"
; LinetypeScale = 1.0
; Lineweight = -1
; Material = "ByLayer"
; Normal = (0.0 0.0 1.0)
; ObjectID (RO) = 2088530560
; ObjectName (RO) = "AcDbPoint"
; OwnerID (RO) = 2021002848
; PlotStyleName = "ByLayer"
; Thickness = 0.0
; TrueColor = #<VLA-OBJECT IAcadAcCmColor 22934730>
; Visible = -1
; Methods supported:
; ArrayPolar (3)
; ArrayRectangular (6)
; Copy ()
; Delete ()
; GetBoundingBox (2)
; GetExtensionDictionary ()
; GetXData (3)
; Highlight (1)
; IntersectWith (2)
; Mirror (2)
; Mirror3D (3)
; Move (2)
; Rotate (2)
; Rotate3D (3)
; ScaleEntity (2)
; SetXData (2)
; TransformBy (1)
; Update ()
nil
Command: (vlax-safearray->list (vlax-variant-value (vlax-get-property obj
'Coordinates)))
(7.51955 1.38385 0.0)
HTH