Good morning everyone.I am working with a text type file that I take as an example for cadastral constructions.This text file has a specific structure but a variable number of lines depending on the number of heights of the buildings and the number of premises in each height.I use the file to:Know the name of the floor, for example “Basement”, “Floor 00”, “Floor 1”, etc. Know the number of heights it represents, that is, I do not have to draw floor 02 if it is the same as floor 01.This plant name and the number of heights it represents are related to a DXF file that I am not using at the moment.The first line that I need to read in any file is 27 where the number of heights of the building is expressed, this line number is fixed; and for each of the plants I find the following structure. “23” (Number of total heights of the building” (line 27 of the file)“01” (Number of heights that the drawing represents) (line 28 of the file)“SOTANO -2” (Floor name) (line 29 of the file)“95” (Number of premises on each floor) (line 30 of the file)“V.01.1” Name of premises 1 (line 31 of the file)“0000080” Area of premises X (line 32 of the file)“CCE.01.1” Local name x1“0000139” Area of premises X1And so on, the name of the premises is repeated and in the next line its surfaceAs I said, the first line that I need to read in any file is line 27 where the number of heights of the building is expressed.Thus, knowing this data, I can know that the next height represented in the file begins at line 221. I reach this conclusion knowing that 30+ (95*2)+1= 221. (Start line+(Number of premises*2 the name of the premises and the surface])+1=221And I'll have to read lines 221-234.I will have to repeat this process until the last height, so I have tried repeating this block of code by using a loop; but since I have never used it I am doing something wrong.I appreciate any helpThank you all.
This is a machine translation, sorry for my bad EnglishI attach the fmw file as well as the txt file