Hide Table of Contents
SetPrecision3 Method (IDisplayDimension)

Sets the number of digits to display after the decimal point for precision and tolerance values in this display dimension.

.NET Syntax

Visual Basic (Declaration) 
Function SetPrecision3( _
   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.SetPrecision3(Primary, Dual, PrimaryTol, DualTol)
System.int SetPrecision3( 
   System.int Primary,
   System.int Dual,
   System.int PrimaryTol,
   System.int DualTol
System.int SetPrecision3( 
&   System.int Primary,
&   System.int Dual,
&   System.int PrimaryTol,
&   System.int DualTol


Number of digits displayed after the decimal point in the primary precision value (see Remarks)
Number of digits displayed after the decimal point in the dual precision value
Number of digits displayed after the decimal point in the primary tolerance value (see Remarks)
Number of digits displayed after the decimal point in the dual tolerance value

Return Value

Return status (see Remarks)


The specified values must be in the range from 0 to 8, which indicates the number of digits after the decimal place to display that value. Alternatively, the values can be defined by swDimensionPrecisionSettings_e.


swDimensionPrecisionSettings_e value 


  • Primary
  • Dual
  • PrimaryTol
  • DualTol


The current setting is not changed.

  • Primary
  • Dual
  • PrimaryTol
  • DualTol


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

  • PrimaryTol
  • DualTol

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

This method does not support setting the Primary and PrimaryTol values for hole callouts. Use ICalloutLengthVariable::Precision and ICalloutLengthVariable::TolerancePrecision to set these values for hole callouts. However, you must use this method to set Dual and DualTol values for hole callouts, because Dual and DualTol are global settings.

The return value indicates the success or failure of this method. In general, a value less than 0 indicates that the method 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 that the method did not fail.

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

  •     Method was successful; all precision values were set.

  •   1   Primary precision value was invalid.

  •   2   Alternate precision value was invalid.

  •   3   Primary tolerance precision value was invalid.

  •   4   Alternate tolerance precision value was invalid.

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



See Also


SOLIDWORKS 2016 FCS, Revision Number 24.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

Subject:   Feedback on Help Topics
Page:   SetPrecision3 Method (IDisplayDimension)
*   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) 2016 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.