VS:GetWSCellFormulaN

From Vectorworks Developer
Revision as of 17:43, 20 September 2011 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Description

Returns the formula from a cell in the referenced worksheet.

PROCEDURE GetWSCellFormulaN(
worksheet :HANDLE;
row :INTEGER;
column :INTEGER;
VAR formula :DYNARRAY[] of CHAR);
def vs.GetWSCellFormulaN(worksheet, row, column):
    return formula

Parameters

worksheet HANDLE Handle to worksheet.
row INTEGER Row of cell to be queried.
column INTEGER Column of cell to be queried.
formula DYNARRAY[] of CHAR Formula contained in worksheet cell.

Example

PROCEDURE WStest;
    VAR
       worksheet : HANDLE;
       inString, outString : DYNARRAY [] OF CHAR;
BEGIN
   worksheet := CreateWS('MyWS', 5, 5);
   inString := '';
   outString := '';

   { inserts a formula into a single cell }
   inString := '=3*2';
   SetWSCellFormulaN(worksheet, 1, 2, 1, 2, inString);

   { gets formula from cell }
   GetWSCellFormulaN(worksheet, 1, 2, outString);

   AlrtDialog(outString); { the cell formula }
END;
RUN(WStest);

Version

Availability: from Vectorworks 2012