Hide Table of Contents
SelectedFaceProperties Method (IModelDoc2)

Sets the property values of the selected face.

.NET Syntax

Visual Basic (Declaration) 
Function SelectedFaceProperties( _
   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 FaceName 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 FaceName As String
Dim value As Boolean
 
value = instance.SelectedFaceProperties(RgbColor, Ambient, Diffuse, Specular, Shininess, Transparency, Emission, UsePartProps, FaceName)
C# 
bool SelectedFaceProperties( 
   int RgbColor,
   double Ambient,
   double Diffuse,
   double Specular,
   double Shininess,
   double Transparency,
   double Emission,
   bool UsePartProps,
   string FaceName
)
C++/CLI 
bool SelectedFaceProperties( 
&   int RgbColor,
&   double Ambient,
&   double Diffuse,
&   double Specular,
&   double Shininess,
&   double Transparency,
&   double Emission,
&   bool UsePartProps,
&   String^ FaceName
) 

Parameters

RgbColor

Face color

Ambient

Face ambient value; valid range is from 0 to 1

Diffuse

Face diffuse value; valid range is from 0 to 1

Specular

Face specular value; valid range is from 0 to 1

Shininess

Face shininess value; valid range is from 0 to 1

Transparency

Face transparency value; valid range is from 0 to 1

Emission

Face emission value; valid range is from 0 to 1

UsePartProps

True if the face inherits the Part properties, false if not

FaceName

Name of the face

Return Value

True if face properties successfully changed, false if not

Example

Remarks

You can use the FaceName argument to set the name for this face.

If the face has a name, then this method does not change the name and returns false. This behavior is intended to prevent a program from renaming a face that is referenced in some other location.

For example, if an assembly contains a mate to a face on a part, then a name is automatically assigned to that face. If you change that name, then there is no guarantee that the mate will still be valid. Therefore, when using entity names, you should first check to see if the entity is already named, and, if so, use the existing name. If no name exists for the face, then you can assign the face a name.

 

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:   SelectedFaceProperties 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.