100不够可以再加。
解决方案 »
- 橡皮筋似画线时候,如何实现线上画线方向一起跟着变化
- mfv 什么是自定义事件
- 加分贴 《500分: 谁能解决者立刻给分,本贴不算,up 有分》
- 请教各位,如何搜索一个没有title的窗口?
- 请教-----关于<深入浅出mfc>的学习
- 请问我的vc++ richedit控件没有loadFile属性?
- ★★★我实在无法忍受VC编辑器的这个特点了,200分征求解决方法。★★★
- DLL里输出变量和把变量定义在共享段(pragam seg())里有什么区别?
- 我的vc没有了对象后面点一下就属性方法,不知那里出了毛病
- 谁指点一下什么是容器,它起什么作用!!!
- 请问如何给程序减肥?
- ★★★★CString怎么样转换成char*★★★★
一起期待高手,:)
' ReadDXF extracts specified code/value pairs from a DXF file.
' This function requires four string parameters, a valid DXF
' file name, a DXF section name, the name of an object in that
' section, and a comma delimited list of codes.
'
function ReadDXF( _
ByVal dxfFile As String, ByVal strSection As String, _
ByVal strObject As String, ByVal strCodeList As String)
Dim tmpCode, lastObj As String
Open dxfFile For Input As #1
' Get the first code/value pair
codes = ReadCodes
' Loop through the whole file until the "EOF" line
While codes(1) <> "EOF"
' If the group code is '0' and the value is 'SECTION' ..
If codes(0) = "0" And codes(1) = "SECTION" Then
' This must be a new section, so get the next
' code/value pair.
codes = ReadCodes()
' If this section is the right one ..
If codes(1) = strSection Then
' Get the next code/value pair and ..
codes = ReadCodes
' Loop through this section until the 'ENDSEC'
While codes(1) <> "ENDSEC"
' While in a section, all '0' codes indicate
' an object. If you find a '0' store the
' object name for future use.
If codes(0) = "0" Then lastObj = codes(1)
' If this object is one you're interested in
If lastObj = strObject Then
' Surround the code with commas
tmpCode = "," & codes(0) & ","
' If this code is in the list of codes ..
If InStr(strCodeList, tmpCode) Then
' Append the return value.
ReadDXF = ReadDXF & _
codes(0) & "=" & codes(1) & vbCrLf
End If
End If
' Read another code/value pair
codes = ReadCodes
Wend
End If
Else
codes = ReadCodes
End If
Wend
Close #1
End Function