We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2017-06-26 06:31 PM
DO !small loop - find matching LayoutNumber in columns 4 to n _readCell = input(_dataSource1, i, _iCol, _colnr) !read row starting with column _iCol in the database IF _readCell>0 AND _colnr = LayoutNumber THEN _foundMatch=1 _iCol = _iCol+1 WHILE _readCell>0 IF _foundMatch=1 THEN _affected=1 !send info to arrayIt works great when the line (row) ends with a value. [edited for clarity]
The return value is the number of successfully read values, in case of end of file (-1).How should I interpret this information? I already have a condition that checks if the result of INPUT() is greater than zero, apparently that's not enough.
Both the row and the column numbers have to be positive integers, otherwise you will get an error message.
If the row or column numbers are incorrect, the input will not be carried out. (n = 0)
If the row and the column can be identified, as many values shall be input from the given starting position as many parameters are given,
or if there are more parameters than values, the parameters without corresponding values will be set to zero.
In case of empty columns (i.e. if there is nothing between the separator characters) the parameters will be set to zero.
2017-06-26 11:33 PM
DO !small loop - find matching LayoutNumber in columns 4 to n _readCell = input(_dataSource1, i, _iCol, _colnr) !read row starting with column _iCol in the database IF VARTYPE(_colnr)=1 THEN _result = str(_colnr,1,0) ELSE _result = _colnr ENDIF IF _readCell>0 AND _result = LayoutNumber THEN _foundMatch=1 _iCol = _iCol+1 WHILE _readCell>0 IF _foundMatch=1 THEN _affected=1 !send info to array