Hide Table of Contents
SelectedFeatureProperties Method (IModelDoc2)

Sets the property values of the selected feature.

.NET Syntax

Visual Basic (Declaration) 
Function SelectedFeatureProperties( _
   ByVal RgbColor As Integer, _
   ByVal Ambient As Double, _
   ByVal Diffuse As Double, _
   ByVal Specular As Double, _
   ByVal Shininess As Double, _
   ByVal Transparency As Double, _
   ByVal Emission As Double, _
   ByVal UsePartProps As Boolean, _
   ByVal Suppressed As Boolean, _
   ByVal FeatureName As String _
) As Boolean
Visual Basic (Usage) 
Dim instance As IModelDoc2
Dim RgbColor As Integer
Dim Ambient As Double
Dim Diffuse As Double
Dim Specular As Double
Dim Shininess As Double
Dim Transparency As Double
Dim Emission As Double
Dim UsePartProps As Boolean
Dim Suppressed As Boolean
Dim FeatureName As String
Dim value As Boolean
 
value = instance.SelectedFeatureProperties(RgbColor, Ambient, Diffuse, Specular, Shininess, Transparency, Emission, UsePartProps, Suppressed, FeatureName)
C# 
bool SelectedFeatureProperties( 
   int RgbColor,
   double Ambient,
   double Diffuse,
   double Specular,
   double Shininess,
   double Transparency,
   double Emission,
   bool UsePartProps,
   bool Suppressed,
   string FeatureName
)
C++/CLI 
bool SelectedFeatureProperties( 
&   int RgbColor,
&   double Ambient,
&   double Diffuse,
&   double Specular,
&   double Shininess,
&   double Transparency,
&   double Emission,
&   bool UsePartProps,
&   bool Suppressed,
&   String^ FeatureName
) 

Parameters

RgbColor
Color
Ambient
Ambient value; valid range is from 0 to 1
Diffuse
Diffuse value; valid range is from 0 to 1
Specular
Specular value; valid range is from 0 to 1
Shininess
Shininess value; valid range is from 0 to 1
Transparency
Transparency value; valid range is from 0 to 1
Emission
Emission value; valid range is from 0 to 1
UsePartProps
True if the feature inherits the properties from the part, false if not
Suppressed
True if the feature is suppressed, false if not
FeatureName
Name of the feature

Return Value

True if feature's properties are successfully set, false if not

Example

Remarks

This method is different from IModelDodc2::SelectedEdgeProperties and IModelDoc2::SelectedFaceProperties in that it allows you to change the name of this feature. All features have names; however, a face or edge typically has a name only if it is being referenced. Because it is dangerous to change the name of a referenced object, you cannot programmatically change the names of faces or edges. See IFeature::Name and IPartDoc::SetEntityName for additional information.

This method requires that the feature to be selected. To select the feature programmatically, you can use IModelDocExtension::SelectByID2 and pass in the feature name and the appropriate object type (for example, "BODYFEATURE", "ATTRIBUTE", "PLANE", "SKETCH", and so on) and the selection coordinates 0,0,0. To determine the feature name and object type, use the IFeature::Name and IFeature::GetTypeName methods, respectively.

 

 

See Also

Availability

SolidWorks 2001Plus FCS, Revision Number 10.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:   SelectedFeatureProperties Method (IModelDoc2)
*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.