Hide Table of Contents
SetSmartComponentData Method (IComponent2)

Sets the features, components, and feature references of a Smart Component.

.NET Syntax

Visual Basic (Declaration) 
Function SetSmartComponentData( _
   ByVal FeaturesSelected As Object, _
   ByVal ComponentsSelected As Object, _
   ByVal References As Object _
) As Boolean
Visual Basic (Usage) 
Dim instance As IComponent2
Dim FeaturesSelected As Object
Dim ComponentsSelected As Object
Dim References As Object
Dim value As Boolean
 
value = instance.SetSmartComponentData(FeaturesSelected, ComponentsSelected, References)
C# 
bool SetSmartComponentData( 
   object FeaturesSelected,
   object ComponentsSelected,
   object References
)
C++/CLI 
bool SetSmartComponentData( 
&   Object^ FeaturesSelected,
&   Object^ ComponentsSelected,
&   Object^ References
) 

Parameters

FeaturesSelected
Array of boolean values indicating which features to enable in the Smart Component (see Remarks)
ComponentsSelected
Array of boolean values indicating which components to enable in the Smart Component (see Remarks)
References
Array of feature reference entities in the target assembly that are used to activate the features specified by FeaturesSelected (see Remarks)

Return Value

True if successful, false if not

Example

Remarks

A Smart Component is defined by its:

  • Components
  • Features
  • Feature references

See the SolidWorks Help for more information about Smart Components.

Use this method to:

  • Change which features and components to enable in a Smart Component.
  • Activate the Smart Features.

Before calling this method:

  1. Open an assembly that contains a Smart Component whose Smart Features have not yet been activated.
  2. Find the Smart Component in the assembly using IComponent2::IsSmartComponent.
  3. Call IComponent2::GetSmartComponentData to obtain the current feature and component arrays for the Smart Component.
  4. Create two boolean arrays whose elements map one-to-one with the elements in the feature and component arrays.
  5. For each element in each boolean array, specify true if the corresponding feature or component is enabled in the Smart Component. Specify false if it is not.
  6. Set FeaturesSelected and ComponentsSelected with the corresponding boolean arrays.
  7. Create an array of reference entities (e.g., faces, edges, points) selected from the target assembly that map to the feature reference entities that were defined for the Smart Component.
  8. Set References to the array of reference entities.

Use ISmartComponentFeatureData to:

  • Insert new features and components into a Smart Component.
  • Delete features and components from a Smart Component.
 

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:   SetSmartComponentData Method (IComponent2)
*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) 2012 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.