(vl-load-com)
(defun c:ObjectID()
;; This example creates several objects in model space.
;; It then iterates through model space and displays the
;; ObjectID for each object found.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq modelSpace (vla-get-ModelSpace doc))
;; Create a Ray object in model space
(setq basePoint (vlax-3d-point 3 3 0)
secondPoint (vlax-3d-point 1 3 0))
(setq rayObj (vla-AddRay modelSpace basePoint SecondPoint))
;; Create a Polyline object in model space
(setq points (vlax-make-safearray vlax-vbDouble '(0 . 5)))
(vlax-safearray-fill points '(3 7
9 2
3 5
)
)
(s