Long SetUserPreference (LPCTSTR Attribute, LPCTSTR Value);
Available (from release):
stOCX (V4-0), stPro Automation (V4-0)
Return Value:
Nonzero if successful otherwise 0.
Parameters:
Name: |
Description: |
Attribute |
The name of the User Preference that is to be set. |
Value |
The value to assign to the specified User Preference. |
Remarks:
Call this function to set a specific User Preference for the current User account.
Attribute information:
The following attributes can be set for the current User account.
Attribute Name: |
Attribute Value(s): |
Description: |
Update Mode: |
"ABBREVIATE TITLE" |
"YES" "NO" |
Set whether or to not abbreviate the Plot titles. |
Immediate |
"ALL ON MAXIMIZE" |
"YES" "NO" |
Set whether to display all the plot controls when a plot is maximized. |
Immediate |
"ANNOTATIONS" |
"YES" "NO" |
Set to indicate whether Annotations should be displayed on the Plot window. |
Immediate |
"APPLY TO GROUP" |
"YES" "NO" |
Controls whether the PEN OVERLAP and PEN ORDERING controls are applied not only to Pens within a Scale Group, but across Scale Groups as well. |
Immediate. |
"AUDIT FLAGS" |
The required Flags ("A" - "Z") |
Sets the specified Audit Flags - i.e. "OP" will set the O and P Flags. Tip: To clear the Audit Flags, specify an empty string (i.e. ""). |
Immediate |
"AUDIT LEVEL" |
"1" "2" "3" "4" "5" |
Set the required Audit level. |
Immediate |
"AUDIT MAX SIZE" |
A positive number (i.e. "1000") |
Set the maximum size for each audit file (in kb). |
Immediate |
"AUDIT VERSIONS" |
A positive number (i.e. "1") |
Set the number of audit file versions that should be kept. |
Immediate |
"AUTO SCALE STRATEGY" |
"FULL RANGE" "STDEV" |
Dictates the algorithm that is used to scale pens in Auto scale mode. |
Immediate. |
"AUTOROUND" |
"YES" "NO" |
Set whether to apply Auto rounding to all new pen scales by default. |
Immediate |
"BLINK LED" |
"YES" "NO" |
Sets whether the Plot Activity button blinks when new data is read. |
Immediate. |
"BAD LINE" and "FILTER LINE" |
"None" "1 px" "2 px" "3 px" "4 px" "5 px" "Dotted" "Dashed" "Dash Dot" "Dash Dot Dot" |
Set the line style for Bad data/Filtered values. Note: Applies to Strip-Charts, Stacked Strip Charts and X-Y Line Plots only. |
On Data Fetch |
"BAD SYMBOL" |
"Dot" "Circle" "Cross" "Plus" "Triangle Up" "Triangle Down" "Square" |
Set the icon to use when displaying bad data. Note: Applies to X-Y Scatter Plots only. |
On Data Fetch |
"DISPLAY SUFFIX" |
"YES" "NO" |
Determines whether the values in the item details area should include suffix delimiters. |
Immediate. |
"HIGHLIGHT XY" |
"YES" "NO" |
Set to control whether new X-Y data values are highlighted. |
Immediate |
"HGRID LINE" and "VGRID LINE"
|
"1 px" "2 px" "3 px" "4 px" "5 px" "Dotted" "Dashed" "Dash Dot" "Dash Dot Dot" |
Set the Horizontal/Vertical Grid line style. |
On Data Fetch |
"IGNORE MISSING SAMPLES" |
"YES" "NO" |
Sets whether missing data will be included in averaging calculations. |
Immediate. |
"ITEM WIDTH" |
A positive number to specify the required width or "AUTO" - for Auto mode. |
Set the width to allow for each pen on the Item details area. |
On Data Fetch |
"LEFT TIME LABEL" |
"START TIME" "DURATION" |
Sets whether the left hand time label shows the start time for the plot, or the plot duration. |
Immediate. |
"LINE INTERPOLATION" |
"STEP" "LINE" "STEPDATA" |
Specify whether you wish stPro to behave like a strip chart emulator. |
On Data Fetch |
"LIVE PEN POINTERS" |
"YES" "NO" |
Sets whether Pen Pointers update at the graph refresh rate regardless of the zoom level. |
Immediate. |
"OPC ALIASES" |
"YES" "NO" |
Set whether to use OPC Item Aliases instead of the OPC Item names for the Pen Selection controls. |
Immediate |
"PEN ORDERING" |
"ASCENDING" "DESCENDING" |
Sets the order in which pens set to Auto Scale mode are added to the plot. Note: Selecting "Ascending" will add Pen 1 at the bottom of the plot and Pen 2 above it, etc. Choosing "Descending" will add Pen 1 at the top of the plot and Pen 2 below it, etc. |
Immediate. |
"PEN OVERLAP" |
Percentage - 0 to 100 |
The amount by which the scales for pens in "Auto" scale mode should overlap. Tip: A setting of 100% means the pens will all be centered vertically around the middle of the plot. Tip: A setting of 0% means each pen will have its own 'band' on the plot and will not overlap with the adjacent pens. |
Immediate. |
"PEN POINTER SIZE" |
"1" = x1 "2" = x1.5 "3" = x2 "4" = x2.5 "5" = x3 |
Sets the size of last value Pen Pointer. |
Immediate. |
"PRINT FIT TO PAGE" |
"YES" "NO" |
Controls whether the plot printout will be stretched to make full use of the page. |
Immediate. |
"PRINT MODE" |
"0" - Color "1" - Color (White Background) "2" - Black & White |
Set the required printing mode. |
Immediate |
"PRINT TITLE" |
"YES" "NO" |
Sets whether the Plot Title should be included when printing a hard copy of the plot. |
Immediate |
"PROPORTIONAL RESIZE" |
"YES" "NO" |
Set whether to maintain the relative size of each plot window with relation to the overall application window size. |
Immediate |
"RATIO IN TITLE" |
"YES" "NO" |
Sets whether the Compression Ratio is included in the Plot title. |
Immediate. |
"RECALC SCALES" |
"YES" "NO" |
Sets whether Fit to View is applied for pens in Auto mode every time data is read. |
Immediate. |
"ROLLOVER HILITE" |
"YES" "NO" |
Sets whether the highlight pens option is active. |
Immediate |
"ROUND INTERMEDIATES" |
"YES" "NO" |
Set whether to round intermediate scales on the Y-axis, or just apply rounding to the top and bottom scales. Note: Rounding Intermediates can result in significant changes being made to the scales to avoid duplicates and/or non linear scales being calculated. |
Immediate |
"SAVE SELECTED PLOTS" |
"YES" "NO" |
Set whether to save the Selected Plots within the Session file. |
Immediate |
"SAVE SIZE" |
"YES" "NO" |
Set whether to save the size and position of the stPro Application window in the Session file. |
Immediate |
"SAVE PROMPT" |
"YES" "NO" |
Set whether the user should be prompted to save changes when closing stPro. |
Immediate |
"SCALE LINES" |
"2" "3" "4" "5" "6" "7" "8" "9" "10" |
Sets the number of Y-axis scale lines for the active plot. |
Immediate |
"SHOW TOOLTIPS" |
"YES" "NO" |
Controls whether the Item Details Tooltips are active. |
Immediate. |
"SLIDESHOW PAUSE" |
A positive number (i.e. "3") |
Set the number of seconds to Pause between plots when operating in Slide Show mode (in seconds). |
Immediate |
"SPLIT YAXIS ON DELIMITER" |
"YES" "NO" |
Sets the way that item names are broken up for the Y-axis labels |
Immediate. |
"SYNCHRONIZE PLOTS" |
"YES" "NO" |
Sets whether time changes in the lead plot will be applied to all other plots. |
Immediate. |
"SYNCHRONIZE CURSORS" |
"YES" "NO" |
Sets whether the plot cursor acts across all the plots within the Session. |
Immediate. |
"TIME OFFSET" |
A numeric - "-24" to "+24" or "PC" (for PC Time Zone). |
Set the offset from UTC to apply when displaying Time stamps.
Note: Specifying a numeric sets the Time Offset to Manual. |
Immediate |
"TOOLBAR SIZE" |
"1" "2" "3" "4" "5" |
Set the required of the stPro Toolbars. |
Immediate |
"TRUE POSITIVE" |
"YES" "NO" |
Set to display Boolean values of -1 as +1. |
Immediate |
"YAXIS COLOR" |
"YES" "NO" |
Set whether the Y-axis labels should be displayed using the associated Pen Color.
Note: The attribute was deprecated in release V5-0. Use the "YAXIS MODE" attribute instead. |
On Data Fetch |
"YAXIS MODE" |
"FOREGROUND" "PEN COLOR" "CURRENT VALUE" "NO LABELS" |
Sets the color that used for the Y-axis labels or whether the central axis tick mark should display the current value of the item. |
Immediate. |
"YAXIS WIDTH" |
"m,n" or "AUTO" - for Automatic. |
Set the number of characters to use for Y-axes (m) and apply any required pixel adjustment (n).
Tip: Fields that contain a delimiter are displayed using the default Field delimiter of ','. If SetDelimiter has been used, then the user should substitute the ',' for the user specified delimiter.. |
On Data Fetch |
Note: Attributes and Values are NOT case sensitive.