zsheng3042 发表于 2022-7-28 20:16

Cadence辅助插件代码分享ix单位增强

应用场景:
当你是mils单位,然后拿到的资料是mm单位时,比如需要复制5个过孔,间距1.115mm
只需要用本Skill   执行ixm 1.115 5 就可以往X方向以1.115间距摆放5个过孔。

有需要的,快来下载吧!!很好用哦



(axlCmdRegister "ixm" 'zs_ipickx_main ?cmdType "sub_cmd")
(axlCmdRegister "iym" 'zs_ipicky_main ?cmdType "sub_cmd")
(axlCmdRegister "ixym" 'zs_ipickxy_main ?cmdType "sub_cmd")
(procedure zs_ipickx_main(@optional unitPitch number)
    (prog (loopv)
      (when unitPitch && atof(unitPitch)
            (if number&& atoi(number) then
                loopv = 1
                while(loopv <= atoi(number)
                  axlShellPost(sprintf(nil "ipick %L" axlMKS2UU(sprintf(nil "%s MM" unitPitch) ) ))
                  loopv++
                )               
            else
                axlShellPost(sprintf(nil "ipick %L" axlMKS2UU(sprintf(nil "%s MM" unitPitch) ) ))
            );end if
      );end when
    )
);end procedure
;   
(procedure zs_ipicky_main(@optional unitPitch number)
    (prog (loopv)
      (when unitPitch && atof(unitPitch)
            (if number&& atoi(number) then
                loopv = 1
                while(loopv <= atoi(number)
                  axlShellPost(sprintf(nil "ipick 0 %L" axlMKS2UU(sprintf(nil "%s MM" unitPitch) ) ))
                  loopv++
                )
            else
                axlShellPost(sprintf(nil "ipick 0 %L" axlMKS2UU(sprintf(nil "%s MM" unitPitch) ) ))
            )
      );end when
    )
);end procedure
(procedure zs_ipickxy_main(@optional unitPitchx unitPitchy number)
    (prog (loopv)
      (when unitPitchx && unitPitchy&& atof(unitPitchx) && atof(unitPitchy)
            (if number&& atoi(number) then
                loopv = 1
                while(loopv <= atoi(number)
                  axlShellPost(sprintf(nil "ipick %L %L" axlMKS2UU(sprintf(nil "%s MM" unitPitchx) )axlMKS2UU(sprintf(nil "%s MM" unitPitchy) ) ))
                  loopv++
                )
            else
                axlShellPost(sprintf(nil "ipick %L %L" axlMKS2UU(sprintf(nil "%s MM" unitPitchx) )axlMKS2UU(sprintf(nil "%s MM" unitPitchy) ) ))   
            )
      );end when
    )
);end procedure

xushan32 发表于 2022-7-28 21:14

io357 发表于 2022-7-29 07:58

南亭好远 发表于 2022-7-29 08:08

lqsgg 发表于 2022-7-29 08:10

power3 发表于 2022-7-29 08:19

谢谢分享了,,,

andyzhou666 发表于 2022-7-29 08:35

ytivy 发表于 2022-7-29 08:38

没明白什么意思

wangyitu 发表于 2022-7-29 08:39

直接看代码太硬了~

ytivy 发表于 2022-7-29 08:39

单位转换一下再画不可以吗?
页: [1] 2 3
查看完整版本: Cadence辅助插件代码分享ix单位增强