我有这程序 代码如下: Sub xyz()Dim x As DoubleDim y As DoubleDim iSet fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("d:\查询结果.txt", True) i = 1On Error Resume NextDim keywordlist As Stringkeywordlist = "o"nextreturnpnt:ThisDrawing.Utility.InitializeUserInput 128, keywordlistDim returnpnt As Variantreturnpnt = ThisDrawing.Utility.GetPoint(, "输入一个点[完成/(o)]:")If Err ThenIf StrComp(Err.Description, "用户输入的是关键字", 1) = 0 ThenDim inputstring As StringErr.Clearinputstring = ThisDrawing.Utility.GetInputa.CloseExit SubElseMsgBox "选择点时发生错误:" & Err.DescriptionErr.ClearEnd IfElsex = Format(Round(returnpnt(1), 4), "0.000")y = Format(Round(returnpnt(0), 4), "0.000")a.WriteLine (i & ",," & x & "," & y)i = i + 1End IfGoTo nextreturnpntEnd Sub在cad中运行上程序,结果保存在d:\查询结果.txt文件中,格式为:点号,X坐标,Y坐标
你只要搞清楚点的类型,构造选择集,再逐一将点的坐标输出到文件即可
6楼的。。说清楚那代码咋用啊。。。。。先谢过。。。
这些点的坐标有什么特征? 是坐标值,还是一些直线或者点?