VS:GetWSSubrowCount: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
(add remark)
mNo edit summary
Line 45: Line 45:


([[User:Orso.b.schmid|Orso]], 2014.09.25): This fails returning zero numSubrows -or other wrong values- when the worksheet needs recalculation: use [[VS:RecalculateWS]] before calling for the count of subrows.
([[User:Orso.b.schmid|Orso]], 2014.09.25): This fails returning zero numSubrows -or other wrong values- when the worksheet needs recalculation: use [[VS:RecalculateWS]] before calling for the count of subrows.
([[User:Juliancarr|Julian]], 2018.05.22): If you call this in a script that is being executed via the Runscript command in a worksheet, it will return the current row number that is being processed. This allows the script to access data from database rows by using [[VS:GetWSSubrowCellValue]].
</remark>
</remark>



Revision as of 03:16, 22 May 2018

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

Description

Returns a count of displayed subrows for a specified database row.

PROCEDURE GetWSSubrowCount(
worksheet :HANDLE;
databaseRow :INTEGER;
VAR numSubrows :INTEGER);
def vs.GetWSSubrowCount(worksheet, databaseRow):
    return numSubrows

Parameters

worksheet HANDLE Handle to worksheet.
databaseRow INTEGER Database row to be queried.
numSubrows INTEGER Number of displayed subrows.

Remarks

WARNING: Because database subrow cells and their contents are dynamically created based on the current database of objects and the current critieria string any return values from this function are not guaranteed to be correct beyond this function call. Use this function carefully and at your own risk.

(Orso, 2014.09.25): This fails returning zero numSubrows -or other wrong values- when the worksheet needs recalculation: use VS:RecalculateWS before calling for the count of subrows.

(Julian, 2018.05.22): If you call this in a script that is being executed via the Runscript command in a worksheet, it will return the current row number that is being processed. This allows the script to access data from database rows by using VS:GetWSSubrowCellValue.

Version

Availability: from VectorWorks 9.0