Difference between revisions of "VS:GetWSCellNumberFormat"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(improve flag list)
Line 63: Line 63:
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<remark>
 
<remark>
 +
 +
([[User:CBM-c-|_c_]] 2022.05.09):
 +
 
Number Format constants:
 
Number Format constants:
style                       value                meaning of accuracy
+
{| class="wikitable"
General                  = 0
+
! flag !! style !!
FixDecimal            = 1                       number of decimal places
+
|-
DecwCommas      = 2                     number of decimal places
+
| 0 || general
Scientific              = 3                       number of decimal places
+
|-
Fractional              = 4                       largest displayed denominator
+
| 1 || decimal
Dimension            = 5                      
+
|-
Angle                      = 6                       corresponds to angular accuracy in units dialog
+
| 2 || decimal with commas
Date                        = 7                      
+
|-
Conditonal          = 8</remark>
+
| 3 || scientific
 +
|-
 +
| 4 || fractional
 +
|-
 +
| 5 || dimension
 +
|-
 +
| 6 || angle
 +
|-
 +
| colspan="2" | For angle, the accuracy displays the angle format as in the pull-down menu list,
 +
 
 +
whereby the choices 1 to 3 are degrees, the rest decimal.
 +
|-
 +
| 7 || date
 +
|-
 +
| colspan="2" | For date, the accuracy displays the date format as in the pull-down menu list.
 +
 
 +
Warning: the returned flags don't correspond the the pull-down index.
 +
|-
 +
| 8 || boolean
 +
|-
 +
| 11 || dimension area
 +
|-
 +
| 12 || dimension volume
 +
|-
 +
| 13 || text
 +
|-
 +
| 14 || percentage
 +
|}
 +
</remark>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<version>
 
<version>
Availability: from VectorWorks9.0
+
Availability: from VectorWorks 9.0
  
 
</version>
 
</version>

Revision as of 03:31, 9 May 2022

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Returns the numeric formatting of a cell in the referenced worksheet.

Specific index values for numeric formats and accuracy are listed in the Appendix.

PROCEDURE GetWSCellNumberFormat(
worksheet  :HANDLE;
row  :INTEGER;
column  :INTEGER;
VAR style  :INTEGER;
VAR accuracy  :INTEGER;
VAR leaderString  :STRING;
VAR trailerString  :STRING);
def vs.GetWSCellNumberFormat(worksheet, row, column):
    return (style, accuracy, leaderString, trailerString)

Parameters

worksheet HANDLE Handle to worksheet.
row INTEGER Row of cell to be queried.
column INTEGER Column of cell to be queried.
style INTEGER Numeric format style index.
accuracy INTEGER Numeric accuracy / secondary format index.
leaderString STRING Leader string (where applicable).
trailerString STRING Trailer string (where applicable).

Remarks

(_c_ 2022.05.09):

Number Format constants:

flag style
0 general
1 decimal
2 decimal with commas
3 scientific
4 fractional
5 dimension
6 angle
For angle, the accuracy displays the angle format as in the pull-down menu list,

whereby the choices 1 to 3 are degrees, the rest decimal.

7 date
For date, the accuracy displays the date format as in the pull-down menu list.

Warning: the returned flags don't correspond the the pull-down index.

8 boolean
11 dimension area
12 dimension volume
13 text
14 percentage

Version

Availability: from VectorWorks 9.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox