|
ExtensionGetSelectedObjectsT Method
|
Gets an array of selected SOLIDWORKS objects.
Namespace:
CADSharpTools.SOLIDWORKS
Assembly:
CADSharpTools.PDM (in CADSharpTools.PDM.dll) Version: 1.4.16.0 (1.4.16)
Syntaxpublic static MethodReturn<T[]> GetSelectedObjects<T>(
this ModelDoc2 swModel,
swSelectType_e swSelectType,
int count,
int selectionMark = -1
)
<ExtensionAttribute>
Public Shared Function GetSelectedObjects(Of T) (
swModel As ModelDoc2,
swSelectType As swSelectType_e,
count As Integer,
Optional selectionMark As Integer = -1
) As MethodReturn(Of T())
Parameters
- swModel
- Type: ModelDoc2
Model document object. - swSelectType
- Type: swSelectType_e
Selection type of the object to be selected. Parameter supports flags but method ignores that. - count
- Type: SystemInt32
Count of the selected objects to return. - selectionMark (Optional)
- Type: SystemInt32
Selection mark. This parameter is optional. If not specified, the selection mark is -1.
Type Parameters
- T
- SOLIDWORKS API object type.
Return Value
Type:
MethodReturnTAn array of selected SOLIDWORKS objects.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ModelDoc2. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
Methods returns an empty of the specified SOLIDWORKS object type if no selection is found.
See Also