用fish语言编程啊!
可以提供一个样本:
; 安装锚杆
sel set link zone_tol 0.05
def place_cable1
loop n (1,56)
y_d=n * 0.9 - 0.9
command
; 下帮
sel cable begin 3.5,y_d,-34 end 5.5,y_d,-34 nseg 4
sel cable begin 3.5,y_d,-35 end 5.5,y_d,-35 nseg 4
; 顶板
sel cable begin 3.4,y_d,-33.5 end 3.4,y_d,-31.5 nseg 4
sel cable begin 2.5,y_d,-33.5 end 2.5,y_d,-31.5 nseg 4
sel cable begin 1.6,y_d,-33.5 end 1.6,y_d,-31.5 nseg 4
sel cable begin 0.7,y_d,-33.5 end 0.7,y_d,-31.5 nseg 4
endcommand
endloop
end
这里的y_d就是沿y轴方向的一个循环变量