オブジェクトを選択して選択セットに配置するか、表内のセルを選択します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.Select Mode [, Point1] [, Point2] [, FilterType, FilterData]
タイプ: SelectionSet
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: AcSelect 列挙型
アクセス: 入力のみ; オプション
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
Point1 を指定する 3D WCS 座標または座標の配列。Point1 の正しい使用法については、モード定義を参照してください。
アクセス: 入力のみ; オプション
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
Point2 を指定する 3D WCS 座標。Point2 の正しい使用法については、モード定義を参照してください。
アクセス: 入力のみ; オプション
タイプ: バリアント型
使用するフィルタのタイプを指定する DXF グループ コード。
アクセス: 入力のみ; オプション
タイプ: バリアント型
フィルタをオンにする値。
VBA:
object.Select wpt, wvwVec, wvwxvec, wxaper, wyaper, allowOutside, resultRowIndex, resultColumnIndex
タイプ: Table
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: バリアント型
入力クリック点を指定する WCS の 3D 点。
アクセス: 入力のみ
タイプ: バリアント型
ヒット テストの視線方向を指定する WCS の 3D ベクトル。
アクセス: 入力のみ
タイプ: バリアント型
ヒット テストの視線方位を指定する WCS の 3D ベクトル。
アクセス: 出力のみ
タイプ: 倍精度浮動小数点数型
ヒット テストのヒット点を中心とするターゲット ボックスの幅(将来使用するために予約)。
アクセス: 出力のみ
タイプ: 倍精度浮動小数点数型
ヒット テストのヒット点を中心とするターゲット ボックスの高さ(将来使用するために予約)。
アクセス: 入力のみ
タイプ: ブール型
アクセス: 出力のみ
タイプ: 長整数型
選択されたセルの行インデックス。
アクセス: 出力のみ
タイプ: 長整数型
選択されたセルの列インデックス。
戻り値はありません。
このメソッドは、フィルタ機能をサポートしています。
次の選択モードを使用できます。
選択モードのオプションについての詳細は、SelectByPolygon、SelectAtPoint、および SelectOnScreen メソッドを参照してください。
この関数は、点、視線方向、向きを指定して表のセルを選択します。選択されたセルの行インデックスおよび列インデックスは、resultRowIndex および resultColumnIndex で返されます。
VBA:
Sub Example_Select()
' This example adds members to a selection set, first by crossing and
' then by filtering for circles.
' Create the selection set
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("SSET")
' Add all object to the selection set that lie within a crossing of (28,17,0) and
' (-3.3, -3.6,0)
Dim mode As Integer
Dim corner1(0 To 2) As Double
Dim corner2(0 To 2) As Double
mode = acSelectionSetCrossing
corner1(0) = 28: corner1(1) = 17: corner1(2) = 0
corner2(0) = -3.3: corner2(1) = -3.6: corner2(2) = 0
ssetObj.Select mode, corner1, corner2
' Add all the Circles to the selection set that lie within the crossing of (28,17,0) and
' (-3.3, -3.6,0) by filtering from the current drawing
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
gpCode(0) = 0
dataValue(0) = "Circle"
Dim groupCode As Variant, dataCode As Variant
groupCode = gpCode
dataCode = dataValue
ssetObj.Select mode, corner1, corner2, groupCode, dataCode
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_Select()
;; This example adds members to a selection set, first by crossing and
;; then by filtering for circles.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Create the selection set
(setq ssetObj (vla-Add (vla-get-SelectionSets doc) "SSET"))
;; Add all object to the selection set that lie within a crossing of (28,17,0) and
;; (-3.3, -3.6,0)
(setq mode acSelectionSetCrossing
corner1 (vlax-3d-point 28 17 0)
corner2 (vlax-3d-point -3.3 -3.6 0))
(vla-Select ssetObj mode corner1 corner2)
(alert (strcat "Objects selected: " (itoa (vla-get-Count ssetObj))))
(vla-Clear ssetObj)
;; Add all the Circles to the selection set that lie within the crossing of (28,17,0) and
;; (-3.3, -3.6,0) by filtering from the current drawing
(setq gpCode (vlax-make-safearray vlax-vbInteger '(0 . 0)))
(vlax-safearray-put-element gpCode 0 0)
(setq dataValue (vlax-make-safearray vlax-vbVariant '(0 . 0)))
(vlax-safearray-put-element dataValue 0 "Circle")
(vla-Select ssetObj mode corner1 corner2 gpCode dataValue)
(alert (strcat "Objects selected: " (itoa (vla-get-Count ssetObj))))
(vla-Delete ssetObj)
)