下例代码能将图形中的每一行距离打印出来“
Dim Entity as Object
With DXFReader1
For Each Entity In .Entities
If Entity.EntityType = "LINE"Then
Printer.Print Sqr((Entity.X1 - Entity.X0) ^ 2 + (Entity.Y1 - Entity.Y0) ^ 2)
End If
Next Entity
End With
完全兼容多种开发工具:Microsoft Visual Basic 4.0/5.0/6.0、Microsoft Excel97、Word97、Access97、Microsoft Excel2000、Word2000、Access2000、Microsoft Visual C++ 6.0、Microsoft Visual J++ 6.0、Microsoft Visual FoxPro 6.0、Borland Delphi 4/5、Borland C++ Builder 5。