功能说明

设计时使用键盘按键切换常用格点或指定格点

使用方法

加载此skill功能

保持鼠标在PCB绘图窗口或command窗口,输入对应层命令按回车键确认即可

格点值单位与设计当前单位一致

直接切换配置值命令,以下数字均为数字键区数字(小键盘),Ctrl建议使用右手边按键

  • CTRL + 0 = 设置格点为0.1
  • CTRL + 1 = 设置格点为1
  • CTRL + 2 = 设置格点为25
  • CTRL + 5 = 设置格点为5

指定格点值:直接在命令栏输入“g 20”回车确认即格点设置为20

程序代码

;Vision:V3.0
;Data:20200820
;Author:Tiny_Y
;skill load("g_grids.il")

axlCmdRegister("g" 'set_grids ?cmdType "interactive")
axlCmdRegister("~e" 'set_grids5 ?cmdType "interactive")
axlCmdRegister("~b" 'set_grids25 ?cmdType "interactive")
axlCmdRegister("~a" 'set_grids1 ?cmdType "interactive")
axlCmdRegister("~" 'set_grids0_1 ?cmdType "interactive")

procedure(set_grids(@optional (grids ""))
	if(grids != ""
		then
			gird_value = atof(grids)
			if(gird_value
				then
					SetGridsScriptCreate(gird_value)
				else
					axlUIWPrint(nil "Sorry,You enter the wrong grid.... Grid set failed...")
			)
		else
			axlUIWPrint(nil "Please Input argument...")
	);end if 
);end procedure
procedure(SetGridsScriptCreate(InGrid)
grid = axlDBGridGet("TOP")
grid->name = 'all
grid->xGrids = InGrid
grid->yGrids = InGrid
axlDBGridSet(grid)
printf("^_^ Set all grid to %.2f Successful\n" InGrid)
);end procedure

procedure(set_grids5(@optional (grids "5.0"))
	SetGridsScriptCreate(5.0))

procedure(set_grids1(@optional (grids "1.0"))
	SetGridsScriptCreate(1.0))

procedure(set_grids25(@optional (grids "25.0"))
	SetGridsScriptCreate(25.0))

procedure(set_grids0_1(@optional (grids "0.1"))
	SetGridsScriptCreate(0.1))
最后修改日期:2020-08-20

作者

留言

撰写回覆或留言

发布留言必须填写的电子邮件地址不会公开。