Hide Table of Contents
AddToFeatureScope Method (IAssemblyDoc)

Adds a component to the scope of the currently selected assembly feature.

.NET Syntax

Visual Basic (Declaration) 
Function AddToFeatureScope( _
   ByVal CompName As System.String _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IAssemblyDoc
Dim CompName As System.String
Dim value As System.Boolean
 
value = instance.AddToFeatureScope(CompName)
C# 
System.bool AddToFeatureScope( 
   System.string CompName
)
C++/CLI 
System.bool AddToFeatureScope( 
&   System.String^ CompName
) 

Parameters

CompName

Name of component to add

Return Value

True if added successfully, false otherwise

Remarks

If no assembly feature is selected, then this method adds a component to a list for use with the next assembly feature created.

Assembly features allow you to create a feature that affects multiple components in an assembly. For example, if you need a hole through two blocks so that you could bolt them together, you can create a hole as an assembly feature and make it go through both blocks.

The scope of the assembly feature determines which components are effected by this feature. In other words, it describes which components can contain the feature.

There are two ways to use the IAssemblyDoc::AddToFeatureScope method:

  • When an assembly feature is selected, IAssemblyDoc::AddToFeatureScope adds a component to the assembly feature's scope. Any component in the scope of the assembly feature can be affected by the assembly feature.

  • You can also use IAssemblyDoc::AddToFeatureScope to compile a group of components. The next assembly feature created (for example, IFeatureManager::SimpleHole) affects each of the components in the compiled group.

After completing these steps, use IAssemblyDoc::UpdateFeatureScope to display the changes.

 

See Also



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:   AddToFeatureScope Method (IAssemblyDoc)
*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) 2015 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.