*************************************
*HEADING
ICEM - ABAQUS INTERFACES VERSION 4.3.1
*************************************
*NODE, NSET=All
1, 3.57257664E-001, 7.21503854E-001,-5.88308394E-001
2, 5.13073504E-001, 6.34439290E-001,-5.73193967E-001
3, 3.82130802E-001, 5.85187793E-001,-7.14455783E-001
4, 4.71597351E-003, 9.97569740E-001,-3.18570733E-002
5,-1.61208332E-001, 9.81357753E-001, 9.37792733E-002
6, 5.42904660E-002, 9.87876654E-001, 1.29430100E-001
7, 5.73833063E-002, 5.97952247E-001,-7.98318803E-001
8,-1.13227673E-001, 5.09487092E-001,-8.52352977E-001
9,-1.13574304E-001, 6.50455713E-001,-7.49002635E-001
10, 4.96486157E-001,-6.51699245E-001,-5.66941082E-001
11, 4.33005393E-001,-5.53390443E-001,-7.08324730E-001
12, 5.99687397E-001,-4.91625935E-001,-6.28453135E-001
13, 6.47903979E-001,-5.82118690E-001,-4.85599875E-001
14, 7.75926113E-001,-5.16589701E-001,-3.55303824E-001
15, 7.45226681E-001,-4.22108412E-001,-5.13358474E-001
16, 8.57427597E-001,-3.43740463E-001,-3.78756881E-001
17, 7.79828489E-001, 6.05409779E-002,-6.21755540E-001
18, 6.70927763E-001, 1.85505182E-001,-7.16200233E-001
19, 7.81173944E-001, 2.40538582E-001,-5.74950337E-001
20, 7.17130676E-002, 1.05336778E-001,-9.90011156E-001
......
*ELEMENT,TYPE=C3D4,ELSET=CREATED_MATERIAL_1_ELSET
文件里面的数据如上,我们只需要读数据,前面的说明文字不用读。现在有二个问题,第一个,如何将文件位置指针定位到数据1?第二个,在二段说明文字之间的数据不确定的,读的时候如何判断循环多少次,意思就是给你一个文件,如何统计出该文件有多少行数据?
*HEADING
ICEM - ABAQUS INTERFACES VERSION 4.3.1
*************************************
*NODE, NSET=All
1, 3.57257664E-001, 7.21503854E-001,-5.88308394E-001
2, 5.13073504E-001, 6.34439290E-001,-5.73193967E-001
3, 3.82130802E-001, 5.85187793E-001,-7.14455783E-001
4, 4.71597351E-003, 9.97569740E-001,-3.18570733E-002
5,-1.61208332E-001, 9.81357753E-001, 9.37792733E-002
6, 5.42904660E-002, 9.87876654E-001, 1.29430100E-001
7, 5.73833063E-002, 5.97952247E-001,-7.98318803E-001
8,-1.13227673E-001, 5.09487092E-001,-8.52352977E-001
9,-1.13574304E-001, 6.50455713E-001,-7.49002635E-001
10, 4.96486157E-001,-6.51699245E-001,-5.66941082E-001
11, 4.33005393E-001,-5.53390443E-001,-7.08324730E-001
12, 5.99687397E-001,-4.91625935E-001,-6.28453135E-001
13, 6.47903979E-001,-5.82118690E-001,-4.85599875E-001
14, 7.75926113E-001,-5.16589701E-001,-3.55303824E-001
15, 7.45226681E-001,-4.22108412E-001,-5.13358474E-001
16, 8.57427597E-001,-3.43740463E-001,-3.78756881E-001
17, 7.79828489E-001, 6.05409779E-002,-6.21755540E-001
18, 6.70927763E-001, 1.85505182E-001,-7.16200233E-001
19, 7.81173944E-001, 2.40538582E-001,-5.74950337E-001
20, 7.17130676E-002, 1.05336778E-001,-9.90011156E-001
......
*ELEMENT,TYPE=C3D4,ELSET=CREATED_MATERIAL_1_ELSET
文件里面的数据如上,我们只需要读数据,前面的说明文字不用读。现在有二个问题,第一个,如何将文件位置指针定位到数据1?第二个,在二段说明文字之间的数据不确定的,读的时候如何判断循环多少次,意思就是给你一个文件,如何统计出该文件有多少行数据?