Hide Table of Contents
GetUserPreferenceDoubleValueRange Method (IModelDocExtension)

Gets the current document default user preference value, and the minimum and maximum valid document user preference values.

.NET Syntax

Visual Basic (Declaration) 
Function GetUserPreferenceDoubleValueRange( _
   ByVal UserPref As System.Integer, _
   ByRef Value As System.Double, _
   ByRef MinValue As System.Double, _
   ByRef MaxValue As System.Double _
) As System.Integer
Visual Basic (Usage) 
Dim instance As IModelDocExtension
Dim UserPref As System.Integer
Dim Value As System.Double
Dim MinValue As System.Double
Dim MaxValue As System.Double
Dim value As System.Integer
 
value = instance.GetUserPreferenceDoubleValueRange(UserPref, Value, MinValue, MaxValue)
C# 
System.int GetUserPreferenceDoubleValueRange( 
   System.int UserPref,
   out System.double Value,
   out System.double MinValue,
   out System.double MaxValue
)
C++/CLI 
System.int GetUserPreferenceDoubleValueRange( 
&   System.int UserPref,
&   [Out] System.double Value,
&   [Out] System.double MinValue,
&   [Out] System.double MaxValue
) 

Parameters

UserPref
User preference as defined in swUserPreferenceDoubleValue_e
Value
Current value of UserPref; if the return value >= 0, see Remarks
MinValue
Minimum value of UserPref; if the return value = 0, see Remarks
MaxValue
Maximum value of UserPref; if the return value= 0, see Remarks

Return Value

Status upon return from this method; see Remarks

Remarks

This method is equivalent to interactively getting document properties in the SOLIDWORKS software.

 

The return value indicates the status upon return from this method:

  • 0 indicates that the current, minimum, and maximum user preference values were retrieved.

  • 1 indicates that the current user preference value was retrieved, but the minimum and maximum user preference values were not.  This most likely occurred because the SOLIDWORKS API code was not implemented to retrieve the minimum and maximum allowed values, so the return value is warning you that not all information was returned. It does not indicate a fatal error. The SOLIDWORKS API code is only implemented for returning the minimum and maximum value in cases where those values are not obvious to the user, such as with user preference swImageQualityShadedDeviation.

  • -1 indicates that the current user preference value could not be retrieved. This most likely occurred because UserPref was not recognized as a valid user preference value.

If you want to retrieve the current user preference value only (i.e., you do not want to retrieve the valid minimum and maximum user preference values), use IModelDocExtension::GetUserPreferenceDouble.

 

See Also

Availability

SOLIDWORKS 2007 FCS, Revision Number 15.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:   GetUserPreferenceDoubleValueRange Method (IModelDocExtension)
*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) 2018 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.