Cadence Skill 论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 18625|回复: 25

格点设置g_grids,源码分享

[复制链接]
发表于 2013-6-9 23:29:16 | 显示全部楼层 |阅读模式
  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. /*            Web site :  www.allegro-skill.com     */
  8. /****************************************************/

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

  10. procedure(set_grids(@optional (grids ""))
  11.         if(grids != ""
  12.                 then
  13.                         gird_value = atof(grids)
  14.                         if(gird_value
  15.                                 then
  16.                                         SetGridsScriptCreate(gird_value)
  17.                                 else
  18.                                         axlUIWPrint(nil "Sorry,You enter the wrong grid.... Grid set failed...")
  19.                         )
  20.                 else
  21.                         axlUIWPrint(nil "Please Input argument...")
  22.         );end if
  23. );end procedure
  24. procedure(SetGridsScriptCreate(InGrid)
  25.         SGScriptFile = outfile("./grids.scr")
  26.         fprintf(SGScriptFile "scriptmode +i +n\n")
  27.         fprintf(SGScriptFile "version 15.5\n")
  28.         fprintf(SGScriptFile "setwindow pcb\n")
  29.         fprintf(SGScriptFile "trapsize 15382\n")
  30.         fprintf(SGScriptFile "define grid\n")
  31.         fprintf(SGScriptFile "setwindow form.grid\n")
  32.         fprintf(SGScriptFile "FORM grid non_etch non_etch_x_grids %n\n" InGrid)
  33.         fprintf(SGScriptFile "FORM grid non_etch non_etch_y_grids %n\n" InGrid)
  34.         fprintf(SGScriptFile "FORM grid all_etch all_etch_x_grids %n\n" InGrid)
  35.         fprintf(SGScriptFile "FORM grid all_etch all_etch_y_grids %n\n" InGrid)
  36.         fprintf(SGScriptFile "FORM grid done\n")
  37.         fprintf(SGScriptFile "setwindow pcb\n")
  38.         close(SGScriptFile)
  39.         sprintf(runScript,"replay %s","./grids.scr")
  40.         axlShell(strcat("replay " "./grids.scr"))
  41.         ;deleteFile("./grids.scr")
  42.         axlVisibleUpdate(t)
  43.         axlUIWPrint(nil "^_^ Set Grid Successful...")
  44. );end procedure
复制代码
发表于 2013-7-5 08:36:50 | 显示全部楼层
有源码,还是谢谢楼主了
发表于 2014-4-12 23:07:11 | 显示全部楼层
楼主真的大方
发表于 2014-4-17 09:40:56 | 显示全部楼层
谢谢楼主
发表于 2014-5-7 16:40:31 | 显示全部楼层
楼主好友爱,谢谢啦O(∩_∩)O~~~
发表于 2014-6-6 22:51:39 | 显示全部楼层
看看,觉得还不错,学习中
发表于 2014-11-14 17:19:36 | 显示全部楼层
看帖必回,楼主V5
发表于 2015-2-6 21:00:03 | 显示全部楼层
thanks for your sharing
发表于 2015-8-27 13:04:22 | 显示全部楼层
fprintf(SGScriptFile "define grid\n")     fprintf(SGScriptFile "setwindow form.grid\n") 你好,这句话是打开设置GRID的窗口的功能么
发表于 2015-9-16 09:30:58 | 显示全部楼层
谢谢分享,学习了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|网站地图|Cadence Skill 论坛 ( 蜀ICP备13024417号 )

GMT+8, 2024-3-29 21:38 , Processed in 0.156662 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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