Hide Table of Contents
AccessSelections Method (ISmartComponentFeatureData)

Gains access to the selection lists on the PropertyManager page of a Smart Component.

.NET Syntax

Visual Basic (Declaration) 
Function AccessSelections( _
   ByVal ShowPMP As System.Boolean _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As ISmartComponentFeatureData
Dim ShowPMP As System.Boolean
Dim value As System.Boolean
 
value = instance.AccessSelections(ShowPMP)
C# 
System.bool AccessSelections( 
   System.bool ShowPMP
)
C++/CLI 
System.bool AccessSelections( 
&   System.bool ShowPMP
) 

Parameters

ShowPMP
True to display the PropertyManager page, false to not (see Remarks)

Return Value

True if the selections where successfully accessed, false if not

Example

Remarks

ShowPMP only controls the display of the PropertyManager page. This method allows access to the PropertyManager page selection lists regardless of whether the PropertyManager page is displayed. The selection lists have marks as defined in swSmartComponentSelectionTypes_e.

This method opens the training assembly in which this Smart Component is defined. 

To delete a feature or component from a Smart Component:

  1. Open the Smart Component in SOLIDWORKS.
  2. Call IFeature::GetDefinition on the "Smart Feature" to get the ISmartComponentFeatureData object.
  3. Call this method to open the training assembly of the Smart Component.
  4. Call ISldWorks::ActiveDoc to set an assembly document variable.
  5. To get a specific feature or component, call ISelectionMgr::GetSelectedObject6(index, mark), where mark is defined in swSmartComponentSelectionTypes_e and index is the position of the item in the selection list.
  6. Select an already selected feature or component to delete it from its selection list. If the object returned by ISelectionMgr::GetSelectedObject6 is a:

    • feature, call IFeature::Select2 to delete that feature from the feature selection list.
    • component, call IComponent2::Select4 to delete that component from the component selection list.
  7. Close the training assembly and release access to the selection lists.

To insert a feature or component into a Smart Component:

  1. Open the Smart Component in SOLIDWORKS.
  2. Call IFeature::GetDefinition on the "Smart Feature" to get the ISmartComponentFeatureData object.
  3. Call this method to open the training assembly of the Smart Component.
  4. Call ISldWorks::ActiveDoc to point to the training assembly.
  5. Call IModelDocExtension::SelectByID2 to specify the feature or component you want to insert, setting Mark to an option in swSmartComponentSelectionTypes_e.
  6. Close the training assembly and release access to the selection lists.

To close the training assembly and release access to the selection lists on the PropertyManager page:

 

See Also

Availability

SOLIDWORKS 2012 FCS, Revision Number 20.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:   AccessSelections Method (ISmartComponentFeatureData)
*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) 2016 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.