Selects an object passing through a
given point and places it into a selection set.
Signature
VBA : object.SelectAtPoint Point, FilterType, FilterData
VL : (vla-SeletAtPoint object Point
FilterType FilterData)
(vla-SelectatPoint
newSet thepoint)
- Object SelectionSet
The object or objects this method applies to.
- Point Variant (three-element array
of doubles); input-only
The 3D WCS coordinates specifying the point to use for the
selection.
- FilterType Integer; input-only;
optional
A DXF group code specifying the type of filter to use.
- FilterData Variant; input-only;
optional
The value to filter on.
Remarks
This method supports the filtering mechanism.
For more selection mode options, see the Select, SelectByPolygon, and
SelectOnScreen methods.
Refer to Visual
Lisp - Selection Objects for more details.
Example :
(defun c:al-selectatpoint ()
(vl-load-com)
(setq thisdrawing (vla-get-activedocument
(vlax-get-acad-object)))
(setq util (vla-get-utility thisdrawing))
(setq thepoint (vla-GetPoint util nil "\nSelect Point : "))
(setq ssets (vla-get-selectionsets thisdrawing))
(if (vl-catch-all-error-p
(vl-catch-all-apply 'vla-item (list ssets "$Set")))
(setq newSet (vla-add ssets "$Set"))
(progn
(vla-delete (vla-item ssets "$Set"))
(setq newSet (vla-add ssets "$Set"))
);progn
);if
(vla-SelectatPoint newSet thepoint)
(princ)
);defun
|
|