VS:GetWSSubrowCount: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
(One intermediate revision by one other user not shown)
Line 42: Line 42:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<remark>
Gets the number of subrows associated with the specified worksheet database row.
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.
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.</remark>
 
([[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>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<version>
<version>
Availability: from VectorWorks9.0
Availability: from VectorWorks 9.0


</version>
</version>

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