请选择 进入手机版 | 继续访问电脑版

EDABOSS电子论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 764|回复: 0

[转帖] 格点设置g_grids,源码分享

[复制链接]

47

主题

3

回帖

430

E币

技术员

Rank: 2

积分
97
发表于 2017-12-16 16:05:31 | 显示全部楼层 |阅读模式
本帖最后由 萌图 于 2017-12-16 16:06 编辑
  1. /****************************************************/
  2. /*               Title :  set grids                                        */
  3. /*     Execute Command :  set_grids                                        */
  4. /*              Author :  Vivien Luo                */
  5. /*       Creation Date :  2013-05-05                */
  6. /*              Update :  2013-06-09                                */
  7. /****************************************************/

  8. axlCmdRegister("g" 'set_grids ?cmdType "interactive")

  9. procedure(set_grids(@optional (grids ""))
  10.         if(grids != ""
  11.                 then
  12.                         gird_value = atof(grids)
  13.                         if(gird_value
  14.                                 then
  15.                                         SetGridsScriptCreate(gird_value)
  16.                                 else
  17.                                         axlUIWPrint(nil "Sorry,You enter the wrong grid.... Grid set failed...")
  18.                         )
  19.                 else
  20.                         axlUIWPrint(nil "Please Input argument...")
  21.         );end if
  22. );end procedure
  23. procedure(SetGridsScriptCreate(InGrid)
  24.         SGScriptFile = outfile("./grids.scr")
  25.         fprintf(SGScriptFile "scriptmode +i +n\n")
  26.         fprintf(SGScriptFile "version 15.5\n")
  27.         fprintf(SGScriptFile "setwindow pcb\n")
  28.         fprintf(SGScriptFile "trapsize 15382\n")
  29.         fprintf(SGScriptFile "define grid\n")
  30.         fprintf(SGScriptFile "setwindow form.grid\n")
  31.         fprintf(SGScriptFile "FORM grid non_etch non_etch_x_grids %n\n" InGrid)
  32.         fprintf(SGScriptFile "FORM grid non_etch non_etch_y_grids %n\n" InGrid)
  33.         fprintf(SGScriptFile "FORM grid all_etch all_etch_x_grids %n\n" InGrid)
  34.         fprintf(SGScriptFile "FORM grid all_etch all_etch_y_grids %n\n" InGrid)
  35.         fprintf(SGScriptFile "FORM grid done\n")
  36.         fprintf(SGScriptFile "setwindow pcb\n")
  37.         close(SGScriptFile)
  38.         sprintf(runScript,"replay %s","./grids.scr")
  39.         axlShell(strcat("replay " "./grids.scr"))
  40.         ;deleteFile("./grids.scr")
  41.         axlVisibleUpdate(t)
  42.         axlUIWPrint(nil "^_^ Set Grid Successful...")
  43. );end procedure
复制代码


积分规则
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|EDABOSS电子论坛

GMT+8, 2023-12-2 17:09 , Processed in 0.039827 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表