Hide Table of Contents
RemoveFromFeatureScope Method (IAssemblyDoc)

Removes a component from the scope of the currently selected assembly feature.

.NET Syntax

Visual Basic (Declaration) 
Function RemoveFromFeatureScope( _
   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.RemoveFromFeatureScope(CompName)
System.bool RemoveFromFeatureScope( 
   System.string CompName
System.bool RemoveFromFeatureScope( 
&   System.String^ CompName



Name of component to remove

Return Value

True if successfully removed, false if not


If no assembly feature is selected, this method removes a component from the list that is to be used 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 to 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 affected by this feature. In other words, it describes which components can contain the feature.

There are two ways to use the this technique:

  • If you have an assembly feature selected, this method removes a component from the assembly features scope. Any component that is not in the scope of the assembly feature cannot be affected by the assembly feature.

  • If you create a list of components, this method allows you to remove a component from the list. The next assembly feature created affects each of the components in your list.

After you use one of these techniques, you can 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

Subject:   Feedback on Help Topics
Page:   RemoveFromFeatureScope Method (IAssemblyDoc)
*   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:


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

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.