AutoCAD脚本不可重现

时间:2014-09-04 20:51:34

标签: scripting autocad

我写了一个AutoCAD脚本,它应该为我绘制两条独立的,空间上分开的三维多段线。但是,在执行脚本之后,我会在折线之间建立连接。有趣的是,连续两次运行脚本可能会产生不同的连接。

AutoCAD脚本非常挑剔空白,因为它们有时被解释为命令终止指示符。下面的脚本中的行末尾没有空格。但是文件末尾有一个空行。

3dpoly 396.958912852,30.8766759787,27.6970084442
392.314112161,78.0361288065,27.6970084442
383.307717991,107.726231443,27.6970084442
369.551813005,153.073372946,27.6970084442
354.926222488,180.435928247,27.6970084442
332.587844921,222.228093208,27.6970084442
312.905111301,246.211573517,27.6970084442
282.842712475,282.842712475,27.6970084442
258.859232165,302.525446095,27.6970084442
222.228093208,332.587844921,27.6970084442
194.865537907,347.213435437,27.6970084442
153.073372946,369.551813005,27.6970084442
123.383270309,378.558207175,27.6970084442
78.0361288065,392.314112161,27.6970084442
47.1594528278,395.355199309,27.6970084442
0.0,400.0,27.6970084442
-47.1594528278,395.355199309,27.6970084442
-78.0361288065,392.314112161,27.6970084442
-123.383270309,378.558207175,27.6970084442
-153.073372946,369.551813005,27.6970084442
-194.865537907,347.213435437,27.6970084442
-222.228093208,332.587844921,27.6970084442
-258.859232165,302.525446095,27.6970084442
-282.842712475,282.842712475,27.6970084442
-312.905111301,246.211573517,27.6970084442
-332.587844921,222.228093208,27.6970084442
-354.926222488,180.435928247,27.6970084442
-369.551813005,153.073372946,27.6970084442
-383.307717991,107.726231443,27.6970084442
-392.314112161,78.0361288065,27.6970084442
-396.958912852,30.8766759787,27.6970084442
-400.0,0.0,27.6970084442
-396.958912852,-30.8766759787,27.6970084442
-392.314112161,-78.0361288065,27.6970084442
-383.307717991,-107.726231443,27.6970084442
-369.551813005,-153.073372946,27.6970084442
-354.926222488,-180.435928247,27.6970084442
-332.587844921,-222.228093208,27.6970084442
-312.905111301,-246.211573517,27.6970084442
-282.842712475,-282.842712475,27.6970084442
-258.859232165,-302.525446095,27.6970084442
-222.228093208,-332.587844921,27.6970084442
-194.865537907,-347.213435437,27.6970084442
-153.073372946,-369.551813005,27.6970084442
-123.383270309,-378.558207175,27.6970084442
-78.0361288065,-392.314112161,27.6970084442
-47.1594528278,-395.355199309,27.6970084442
0.0,-400.0,27.6970084442
47.1594528278,-395.355199309,27.6970084442
78.0361288065,-392.314112161,27.6970084442
123.383270309,-378.558207175,27.6970084442
153.073372946,-369.551813005,27.6970084442
194.865537907,-347.213435437,27.6970084442
222.228093208,-332.587844921,27.6970084442
258.859232165,-302.525446095,27.6970084442
282.842712475,-282.842712475,27.6970084442
312.905111301,-246.211573517,27.6970084442
332.587844921,-222.228093208,27.6970084442
354.926222488,-180.435928247,27.6970084442
369.551813005,-153.073372946,27.6970084442
383.307717991,-107.726231443,27.6970084442
392.314112161,-78.0361288065,27.6970084442
396.958912852,-30.8766759787,27.6970084442
400.0,0.0,27.6970084442
396.958912852,30.8766759787,27.6970084442

3dpoly 392.314112161,78.0361288065,-27.6970084442
396.958912852,30.8766759787,-27.6970084442
400.0,0.0,-27.6970084442
396.958912852,-30.8766759787,-27.6970084442
392.314112161,-78.0361288065,-27.6970084442
383.307717991,-107.726231443,-27.6970084442
369.551813005,-153.073372946,-27.6970084442
354.926222488,-180.435928247,-27.6970084442
332.587844921,-222.228093208,-27.6970084442
312.905111301,-246.211573517,-27.6970084442
282.842712475,-282.842712475,-27.6970084442
258.859232165,-302.525446095,-27.6970084442
222.228093208,-332.587844921,-27.6970084442
194.865537907,-347.213435437,-27.6970084442
153.073372946,-369.551813005,-27.6970084442
123.383270309,-378.558207175,-27.6970084442
78.0361288065,-392.314112161,-27.6970084442
47.1594528278,-395.355199309,-27.6970084442
0.0,-400.0,-27.6970084442
-47.1594528278,-395.355199309,-27.6970084442
-78.0361288065,-392.314112161,-27.6970084442
-123.383270309,-378.558207175,-27.6970084442
-153.073372946,-369.551813005,-27.6970084442
-194.865537907,-347.213435437,-27.6970084442
-222.228093208,-332.587844921,-27.6970084442
-258.859232165,-302.525446095,-27.6970084442
-282.842712475,-282.842712475,-27.6970084442
-312.905111301,-246.211573517,-27.6970084442
-332.587844921,-222.228093208,-27.6970084442
-354.926222488,-180.435928247,-27.6970084442
-369.551813005,-153.073372946,-27.6970084442
-383.307717991,-107.726231443,-27.6970084442
-392.314112161,-78.0361288065,-27.6970084442
-396.958912852,-30.8766759787,-27.6970084442
-400.0,0.0,-27.6970084442
-396.958912852,30.8766759787,-27.6970084442
-392.314112161,78.0361288065,-27.6970084442
-383.307717991,107.726231443,-27.6970084442
-369.551813005,153.073372946,-27.6970084442
-354.926222488,180.435928247,-27.6970084442
-332.587844921,222.228093208,-27.6970084442
-312.905111301,246.211573517,-27.6970084442
-282.842712475,282.842712475,-27.6970084442
-258.859232165,302.525446095,-27.6970084442
-222.228093208,332.587844921,-27.6970084442
-194.865537907,347.213435437,-27.6970084442
-153.073372946,369.551813005,-27.6970084442
-123.383270309,378.558207175,-27.6970084442
-78.0361288065,392.314112161,-27.6970084442
-47.1594528278,395.355199309,-27.6970084442
0.0,400.0,-27.6970084442
47.1594528278,395.355199309,-27.6970084442
78.0361288065,392.314112161,-27.6970084442
123.383270309,378.558207175,-27.6970084442
153.073372946,369.551813005,-27.6970084442
194.865537907,347.213435437,-27.6970084442
222.228093208,332.587844921,-27.6970084442
258.859232165,302.525446095,-27.6970084442
282.842712475,282.842712475,-27.6970084442
312.905111301,246.211573517,-27.6970084442
332.587844921,222.228093208,-27.6970084442
354.926222488,180.435928247,-27.6970084442
369.551813005,153.073372946,-27.6970084442
383.307717991,107.726231443,-27.6970084442
392.314112161,78.0361288065,-27.6970084442 

1 个答案:

答案 0 :(得分:1)

经过一些研究后,我发现如果启用了对象捕捉功能,AutoCAD在脚本执行期间显然会捕捉到。如果关闭该功能,一切都很好。