> GetUserPreferenceDoubleValueRange Method (IModelDocExtension)
Welcome
Getting Started
SolidWorks API Help
FeatureWorks API Help
SolidWorks Document Manager API Help
eDrawings API Help
SolidWorks Routing API Help
SolidWorks Simulation API Help
SolidWorks Utilities API Help
SolidWorks Workgroup PDM API Help
Hide Table of Contents Show 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)
C# 
int GetUserPreferenceDoubleValueRange( 
   int UserPref,
   out double Value,
   out double MinValue,
   out double MaxValue
)
C++/CLI 
int GetUserPreferenceDoubleValueRange( 
&   int UserPref,
&   [Out] double Value,
&   [Out] double MinValue,
&   [Out] 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


Related SolidWorks Forum Content

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:  
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) 2012 SP05

The search functionality within the web help is in a beta test phase and you may experience periodic delays or interruptions in its performance. These are the normal and ordinary features of a beta test and shall not under any circumstances give rise to any liability on the part of DS SolidWorks or its licensors. The topics within the Web-based help are not beta topics; they document API Help (English only) 2012 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.