各位高手帮忙看一下如何通过VB对文本转换
以下是文本文件内容:**********************************************************************************************************************
TABLE: "BRIDGE DESIGN PREFERENCES - JTG-D62-2004"
Importance="Class II" FactLim=1
TABLE: "BRIDGE DESIGN PREFERENCES - AASHTOLRFD07"
HingeOpt="Auto: AASHTO/Caltrans Hinge"
TABLE: "JOINT COORDINATES"
Joint=1 CoordSys=GLOBAL CoordType=Cartesian XorR=-3 Y=-3 Z=0 SpecialJt=No GlobalX=-3 GlobalY=-3 GlobalZ=0
Joint=2 CoordSys=GLOBAL CoordType=Cartesian XorR=-3 Y=-3 Z=3 SpecialJt=No GlobalX=-3 GlobalY=-3 GlobalZ=3
Joint=3 CoordSys=GLOBAL CoordType=Cartesian XorR=-3 Y=3 Z=0 SpecialJt=No GlobalX=-3 GlobalY=3 GlobalZ=0
Joint=4 CoordSys=GLOBAL CoordType=Cartesian XorR=-3 Y=3 Z=3 SpecialJt=No GlobalX=-3 GlobalY=3 GlobalZ=3
Joint=5 CoordSys=GLOBAL CoordType=Cartesian XorR=3 Y=-3 Z=0 SpecialJt=No GlobalX=3 GlobalY=-3 GlobalZ=0
Joint=6 CoordSys=GLOBAL CoordType=Cartesian XorR=3 Y=-3 Z=3 SpecialJt=No GlobalX=3 GlobalY=-3 GlobalZ=3
Joint=7 CoordSys=GLOBAL CoordType=Cartesian XorR=3 Y=3 Z=0 SpecialJt=No GlobalX=3 GlobalY=3 GlobalZ=0
Joint=8 CoordSys=GLOBAL CoordType=Cartesian XorR=3 Y=3 Z=3 SpecialJt=No GlobalX=3 GlobalY=3 GlobalZ=3
TABLE: "CONNECTIVITY - FRAME"
Frame=1 JointI=1 JointJ=2 IsCurved=No Length=3 CentroidX=-3 CentroidY=-3 CentroidZ=1.5
Frame=2 JointI=3 JointJ=4 IsCurved=No Length=3 CentroidX=-3 CentroidY=3 CentroidZ=1.5
Frame=3 JointI=5 JointJ=6 IsCurved=No Length=3 CentroidX=3 CentroidY=-3 CentroidZ=1.5
Frame=4 JointI=7 JointJ=8 IsCurved=No Length=3 CentroidX=3 CentroidY=3 CentroidZ=1.5
Frame=5 JointI=2 JointJ=6 IsCurved=No Length=6 CentroidX=0 CentroidY=-3 CentroidZ=3
Frame=6 JointI=4 JointJ=8 IsCurved=No Length=6 CentroidX=0 CentroidY=3 CentroidZ=3
Frame=7 JointI=2 JointJ=4 IsCurved=No Length=6 CentroidX=-3 CentroidY=0 CentroidZ=3
Frame=8 JointI=6 JointJ=8 IsCurved=No Length=6 CentroidX=3 CentroidY=0 CentroidZ=3
*************************************************************************************************************
现在想将红色部分的内容提取生成一下蓝色内容到另一文本1.txt文件中,就是首先查找到TABLE: "JOINT COORDINATES",提取“Joint=1”等号后面的“1”(1为节点号),“XorR=-3”、“Y=-3”、“Z=0”(XorR,Y,Z为节点X,Y,Z坐标值)等号后面的-3、-3、0,然后形成“节点号,节点X坐标值,节点Y坐标值,节点Z坐标值”的形式。最后1.txt文本的内容为:
*****************************
* JOINT COORDINATES
1, -3,-3,-3,0
2, -3,-3,-3,3
3, -3,-3, 3,0
4, -3,-3, 3,3
5, 3, 3,-3,0
6, 3, 3,-3,3
7, 3, 3, 3,0
8, 3, 3, 3,3
[ 本帖最后由 nick_dd 于 2013-5-19 22:49 编辑 ]