- 积分
- 12459
- 明经币
- 个
- 注册时间
- 2003-5-28
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-9-4 22:55:00
|
显示全部楼层
回复
本帖最后由 作者 于 2004-9-5 11:15:53 编辑
用VBA比较方便,先编辑一下xls为txt
参考:
包含了: txt, dvb, dwg.
Sub test() On Error GoTo ERRORHANDLER Dim path As String path = "F:\程序\MJTD\坐标剪力半径\坐标剪力半径.txt" '*路径设置* Dim x, y, z, t, r As Double Open path For Input As #1 Do While Not EOF(1) Input #1, x, y, z, t, r 'Create Point Dim pointObj As AcadPoint Dim location(0 To 2) As Double 'Define the location of the point location(0) = x: location(1) = y: location(2) = z 'Create the point Set pointObj = ThisDrawing.ModelSpace.AddPoint(location) 'Create circle in model space. Dim circleObj As AcadCircle Dim centerPoint(0 To 2) As Double Dim radius As Double 'Define the circle centerPoint(0) = x: centerPoint(1) = y: centerPoint(2) = z radius = r 'Create the Circle object in model space Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius) ZoomExtents Loop Close #1 MsgBox "Finished" Exit Sub ERRORHANDLER: Debug.Print Err.Description & Err.Number End Sub
For AutoCAD2000:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
|