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 Integer, _
   ByRef Value As Double, _
   ByRef MinValue As Double, _
   ByRef MaxValue As Double _
) As Integer
Visual Basic (Usage) 
Dim instance As IModelDocExtension
Dim UserPref As Integer
Dim Value As Double
Dim MinValue As Double
Dim MaxValue As Double
Dim value As Integer
value = instance.GetUserPreferenceDoubleValueRange(UserPref, Value, MinValue, MaxValue)
int GetUserPreferenceDoubleValueRange( 
   int UserPref,
   out double Value,
   out double MinValue,
   out double MaxValue
int GetUserPreferenceDoubleValueRange( 
&   int UserPref,
&   [Out] double Value,
&   [Out] double MinValue,
&   [Out] double MaxValue


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

Return Value

Status upon return from this method; see 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


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

Subject:   Feedback on Help Topics
Page:   GetUserPreferenceDoubleValueRange Method (IModelDocExtension)
*   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) 2010 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.