Hide Table of Contents
SetPlotColorOptions Method (ICWResults)

Sets the color options for the specified plot.

.NET Syntax

Visual Basic (Declaration) 
Function SetPlotColorOptions( _
   ByVal SPlotName As System.String, _
   ByVal NType As System.Integer, _
   ByVal NContour As System.Integer, _
   ByVal NBaseColor As System.Integer, _
   ByVal BFlip As System.Boolean, _
   ByVal BSpecifyColorLimit As System.Boolean, _
   ByVal VarColor As System.Object _
) As System.Integer
Visual Basic (Usage) 
Dim instance As ICWResults
Dim SPlotName As System.String
Dim NType As System.Integer
Dim NContour As System.Integer
Dim NBaseColor As System.Integer
Dim BFlip As System.Boolean
Dim BSpecifyColorLimit As System.Boolean
Dim VarColor As System.Object
Dim value As System.Integer
value = instance.SetPlotColorOptions(SPlotName, NType, NContour, NBaseColor, BFlip, BSpecifyColorLimit, VarColor)
System.int SetPlotColorOptions( 
   System.string SPlotName,
   System.int NType,
   System.int NContour,
   System.int NBaseColor,
   System.bool BFlip,
   System.bool BSpecifyColorLimit,
   System.object VarColor
System.int SetPlotColorOptions( 
&   System.String^ SPlotName,
&   System.int NType,
&   System.int NContour,
&   System.int NBaseColor,
&   System.bool BFlip,
&   System.bool BSpecifyColorLimit,
&   System.Object^ VarColor


Plot name (see Remarks)
Color map as defined in swsColorChartOptionLegendTypeValue_e (see Remarks)
2 <= Number of gradient colors <= 24
Number of base colors for NType; valid only if NType is swsColorChartOptionLegendTypeValue_e.swsColorChartOptionLegendUserDefined (see Remarks)
True to reverse the color mapping, false to not
True to specify a color for values above the yield limit, false to not; valid only for von Mises stress plots of single body parts where the yield strength is defined

Array of RGB triplets:

  • RGB color for values above the yield limit; valid only if BSpecifyColorLimit is true
  • One or more RGB triplets of user-defined colors

Return Value

Error as defined in swsResultsError_e


Call ICWResults::GetPlotNames to populate SPlotName.

If NType is swsColorChartOptionLegendTypeValue_e... Then NBaseColor is...
swsColorChartOptionLegendDefault 5
swsColorChartOptionLegendRainbow 7
swsColorChartOptionLegendGrayScale 2
swsColorChartOptionLegendUserDefined 2-9

See Also


SOLIDWORKS Simulation API 2015 SP0

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:   SetPlotColorOptions Method (ICWResults)
*   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) 2017 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.