📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2496
ClientLeft = 48
ClientTop = 336
ClientWidth = 3744
LinkTopic = "Form1"
ScaleHeight = 2496
ScaleWidth = 3744
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 612
Left = 720
TabIndex = 1
Text = "Text1"
Top = 360
Width = 1812
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 612
Left = 1560
TabIndex = 0
Top = 1200
Width = 1572
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'cmndia.ShowOpen
Text1.Text = "芜湖地形.dxf"
Dim fn As String
Dim strType As String, strCon1 As String, strCon2 As String, strCon3 As String
Dim strCon As String
Dim x, y, z As Double
Open "out.txt" For Output As #2
Dim b1 As Boolean
fn = "芜湖地形.dxf"
Open fn For Input As #1
While Not EOF(1)
Input #1, strType
If strType = "POINT" Then
Input #1, strCon1
If strCon1 = "10" Then
Input #1, x
Else
GoTo nextone
End If
Input #1, strCon2
If strCon2 = "20" Then
Input #1, y
Else
GoTo nextone
End If
Input #1, strCon3
If strCon3 = "30" Then
Input #1, z
Else
GoTo nextone
End If
Write #2, x; y; z
'b1 = False
'Do
' Input #1, strCon
' If strCon = "1" Then
' z = 0 'if input 汉字,则z为0。
'but such as "1桥",则z为1。
' Input #1, z
' If Abs(z) > 0 Then
' Write #2, x; y; z
' Debug.Print x; y; z
' b1 = True
' End If
' End If
' Loop Until b1
End If
nextone:
Wend
Close 1
Close 2
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -