MicroStaton 键入key-in里批量输入坐标绘点、线、文本

可以将一批键入命令写入脚本文件里(纯文本文件),然后在“键入命令”窗口中,键入 @<script_file>。
script_file 必须包括脚本文件的完整路径和文件名。

最简单的软件应用程序是键入命令脚本。键入命令脚本是存储在文本文件中的一系列键入命令。例如,以下脚本设置激活层、激活颜色和激活线宽:

active level Level 3
active color blue
active weight 2

1、点
place point;XY=388218.835,1566315.816;
place point;XY=388219.911,1566320.28;
place point;XY=388216.28,1566320.868;
place point;XY=388215.36,1566316.473;
place point;XY=388211.706,1566317.245;
place point;XY=388212.713,1566321.593;

以上格式即可以在key-in里输入也可以存为point.txt后以@f:\point.txt脚本执行。

2、线
在key-in里用以下格式:
place smartline;xy=388218.835,1566315.816;
place smartline;xy=388219.911,1566320.28;
place smartline;xy=388216.28,1566320.868;
place smartline;xy=388215.36,1566316.473;
place smartline;xy=388211.706,1566317.245;
place smartline;xy=388212.713,1566321.593;

若是要存为文本脚本则以下格式:
place smartline;
xy=388218.835,1566315.816;
xy=388219.911,1566320.28;
xy=388216.28,1566320.868;
xy=388215.36,1566316.473;
xy=388211.706,1566317.245;
xy=388212.713,1566321.593;

以上存为line.txt,在key-in里输入@f:\line.txt执行即可。

3、文本
可以将以下代码写入f:盘下的text.txt:

place text;
SB1;xy=363756.733,3252942.92,616.6;
SB2;xy=363871.568,3253480.798,616.6;
SW1;xy=363739.821,3252863.705,616.6;
SZ1;xy=363763.572,3252951.486,613.6;
SZ2;xy=363806.619,3253000.903,590.9;
a1;xy=363848.573,3253090.802,575;
SZ3;xy=363906.624,3253215.191,553;
SZ4;xy=363923.118,3253292.45,553;
a2;xy=363905.412,3253357.029,575;
SZ5;xy=363874.345,3253470.337,613.6;
reset;

然后在key-in里输入:
@f:\text.txt

以上代码在key-in里直接输入无效。

©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页