- Fri Oct 05, 2012 12:36 am
#208596
Trying to update our zone GDL to automatically calculate occupancy numbers using use tables from the Building Code. I'm using an external text file to hold the table data so that it can be updated if the Building Code changes.
Can anyone suggest some code or point me in the right direction for a guide for this?
!-- Getting NCC Table D1.13 valuesNot having done much work yet with arrays I'm now stuck as to the next step to use the value the user selects from the drop down for NCC_TableD113_Use to select the matching value for the NCC_TableD113_Rate.
dim value_use[], value_rate[]
filename= "NCCTableD113.txt"
ch1=OPEN("TEXT",filename,"SEPARATOR='\t',MODE=RO,LIBRARY")
!--counting the total number of rows
row=0
do
row= row+1
n=INPUT(ch1,row,1,string1)
while n>-1
!--reading the first column for NCC_TableD113_Use
for k= 1 to row-1
n=INPUT(ch1,k,1,string1)
value_use[k]= string1
next k
!--reading the second column for NCC_TableD113_Rate
for m= 1 to row-1
n=INPUT(ch1,m,2,string2)
value_rate[m]= string2
next m
CLOSE (ch1)
VALUES "NCC_TableD113_Use" value_use, custom
Can anyone suggest some code or point me in the right direction for a guide for this?
Matthew Johnson - P O W E . Architects
AC24, Windows 7 64bit
Dell Precision 5520 i7 w/ Nvidia Quadro M1200 4K dual
I'd rather be sailing
AC24, Windows 7 64bit
Dell Precision 5520 i7 w/ Nvidia Quadro M1200 4K dual
I'd rather be sailing