Hide Table of Contents
Select4 Method (IEntity)

Selects an entity and marks it.

.NET Syntax

Visual Basic (Declaration) 
Function Select4( _
   ByVal Append As System.Boolean, _
   ByVal Data As SelectData _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IEntity
Dim Append As System.Boolean
Dim Data As SelectData
Dim value As System.Boolean
 
value = instance.Select4(Append, Data)
C# 
System.bool Select4( 
   System.bool Append,
   SelectData Data
)
C++/CLI 
System.bool Select4( 
&   System.bool Append,
&   SelectData^ Data
) 

Parameters

Append

True appends the entity to the selection list, false replaces the selection list with this entity

Data

Pointer to the ISelectData object

Return Value

True if the selection is successful, false if not

Example

Remarks

When you use this method, selection behaves differently depending on the command state of SOLIDWORKS. One case is when SOLIDWORKS is running a command that has a PropertyManager associated with a selection list box (for example, a feature creation command such as Insert Fillet). The selection behavior in this case is:

 

  • Selecting a new entity appends it to the selection list.

- or -

  • Selecting an entity that is already selected deselects the entity.

SOLIDWORKS ignores the Append argument because the selection is always appended to the selection list.

 

The second case is when there is no command running, which is the default state of SOLIDWORKS.

 

You can use this method only with IEntity objects that you get from the active document. For example, if Assembly1 is the active document when you call this method, then you must get the entity directly from the Assembly1 document. You can do this using items in the selection list (for example, ISelectionMgr::GetSelectedObject6) or you can traverse the body of an assembly component (for example, IComponent2::GetBody and IBody2::GetFirstFace). You cannot obtain the entity from the underlying part document (for example, IComponent2::GetModelDoc or IBody2::GetFirstFace).

 

You can use this method to select features. In Visual C++, you must first get the IEntity interface from the IFeature object.

 

See Also

Availability

SOLIDWORKS 2004 FCS, Revision Number 12.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Select4 Method (IEntity)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:




x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2023 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.