为什么不用FileSystemObject,对于文本文件FileSystemObject类是强项 - Sub h()Dim str As String
- Dim fso As New FileSystemObject
- Dim ts As TextStream
- Dim MTextObj As AcadMTextSet ts = fso.OpenTextFile("c:\1.txt")
- str = Replace(ts.ReadAll, vbCrLf, "\P")
- ts.Closepnt = ThisDrawing.Utility.GetPoint
- Set MTextObj = ThisDrawing.ModelSpace.AddMText(pnt, 0, str)End Sub
|