Hide Table of Contents
SetPrecision2 Method (IDisplayDimension)

Obsolete. Superseded by IDisplayDimension::SetPrecision3.

.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 digits displayed after the decimal point in the dimension value (see Remarks)
Dual
Number of digits displayed after the decimal point in the dual dimension value
PrimaryTol
Number of digits displayed after the decimal point in the tolerance value (see Remarks)
DualTol
Number of digits displayed after the decimal point 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, which indicates the number of digits after the decimal place to display that value. Alternatively, the precision values can be defined by swDimensionPrecisionSettings_e.

Parameter

swDimensionPrecisionSettings_e value 

Result

  • Primary
  • Dual
  • PrimaryTol
  • DualTol

swDoNotChangePrecisionSetting

The current setting is not changed.

  • Primary
  • Dual
  • PrimaryTol
  • DualTol

swPrecisionFollowsDocumentSetting

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
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 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 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

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) 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.