I'm trying to select the two lines that I've created. I'm trying to select them based on their starting points, but I'm not having much luck.
(defun AddLines ()
(setq adoc (vla-get-activedocument (vlax-get-acad-object))
acsp (if (zerop (vla-get-activespace adoc))
(if (=(vla-get-mspace adoc) :vlax-true)
(vla-get-modelspace adoc)
(vla-get-paperspace adoc)
)
(vla-get-modelspace adoc))
)
(vla-addline acsp ;add li line to relay output module
(vlax-3d-point (list 2.96 9 0))
(vlax-3d-point (list 2 9 0))
) ;vla-addline
(vla-addline acsp ;add out line to relay output module
(vlax-3d-point (list 5.04 8.8 0))
(vlax-3d-point (list 6 8.8 0))
) ;vla-addline
(command ".Regen")
(setq ss (ssget "X" '((0 . "LINE")
(-4 . "<OR") (10 2.96 9.0 0.0) (10 5.04 8.8 0.0) (-4 . "OR>"))
)
) ;setq
(setq en (ssname ss 0))
(setq obj (vlax-ename->vla-object en)
numrows 16
numcol 1
numlevels 1
rowspace -0.4
colspace 0
distbetlevels 0
) ;setq
(setq arrobj (vla-arrayrectangular obj numrows numcol numlevels rowspace colspace distbetlevels)
objlst (vlax-safearray->list (vlax-variant-value arrobj))
) ;setq
(princ)
) ;defun