Hide Table of Contents
SetPrecision2 Method (IDisplayDimension)

Sets the displayed precisions of this display dimension and its tolerance values.

.NET Syntax

Visual Basic (Declaration) 
Function SetPrecision2( _
   ByVal Primary As System.Integer, _
   ByVal Dual As System.Integer, _
   ByVal PrimaryTol As System.Integer, _
   ByVal DualTol As System.Integer _
) As System.Integer
Visual Basic (Usage) 
Dim instance As IDisplayDimension
Dim Primary As System.Integer
Dim Dual As System.Integer
Dim PrimaryTol As System.Integer
Dim DualTol As System.Integer
Dim value As System.Integer
 
value = instance.SetPrecision2(Primary, Dual, PrimaryTol, DualTol)
C# 
System.int SetPrecision2( 
   System.int Primary,
   System.int Dual,
   System.int PrimaryTol,
   System.int DualTol
)
C++/CLI 
System.int SetPrecision2( 
&   System.int Primary,
&   System.int Dual,
&   System.int PrimaryTol,
&   System.int DualTol
) 

Parameters

Primary
Number of decimal places displayed in the dimension value
Dual
Number of decimal places displayed in the dual dimension value
PrimaryTol
Number of decimal places displayed in the tolerance value
DualTol
Number of decimal places displayed in the dual tolerance value

Return Value

Return status (see Remarks)

Remarks

The specified precision values must be in the range from 0 to 8.  Alternatively, it can be a value as defined by swDimensionPrecisionSettings_e.

For the primary or dual precision value, a value of 0 through 8 indicates the number of decimal places to display.  

If the value is...

Then...

swDoNotChangePrecisionSetting

The current setting is not changed.

swPrecisionFollowsDocumentSetting

The number of decimal places to display should follow the document setting.  Use IModelDocExtension::GetUserPreferenceInteger or IModelDocExtension::SetUserPreferenceInteger -swDetailingLinearDimPrecision, or swDetailingAngularDimPrecision, or swDetailingAltLinearDimPrecision to get or set that value.

For the primary or dual tolerance precision value, a value of 0 through 8 indicates the number of decimal places to display.

If the value is...

Then...

swDoNotChangePrecisionSetting

The current setting is not changed.

swPrecisionFollowsDocumentSetting

The number of decimal places to display should follow the document setting. Use IModelDocExtension::GetUserPreferenceInteger or IModelDocExtension::SetUserPreferenceInteger -swDetailingLinearDimPrecision, swDetailingAngularDimPrecision, or  swDetailingAltLinearDimPrecision to get or set that value.

swTolerancePrecisionFollowsNominal

The number of decimal places to display is the same as for the dimension or dual dimension value.

The return value indicates the success or failure of this method. In general, a value less than 0 indicates that the command failed and SolidWorks did not set any precision values. A value of 0 indicates success. A value greater than 0 indicates that a problem occurred, but the command did not fail.

  •  -1  Command failed; no precision values were set.

  •   0  Command was successful; all precision values were set.

  •   1  Primary precision argument was invalid.

  •   2  Alternate precision argument was invalid.

  •   3  Primary tolerance precision argument was invalid.

  •   4  Alternate tolerance precision argument was invalid.

After using this method, use IModelDoc2::GraphicsRedraw2 to redraw the graphics window to see your changes.

 

See Also

Availability

SolidWorks 2004 FCS, Revision Number 12.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:   SetPrecision2 Method (IDisplayDimension)
*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) 2014 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.