| |||
脚本功能:将layout转为layout_xform pcell,layout_xform 有缩放、更改角度的功能。
文件名称:createXformPCell.il
使用语言:skill
软件版本:IC617及以上版本
使用方法:CIW窗口 load("XXX/createXformPCell.il")后,再执行“createXformPCellForm”命令,弹出下图所示的窗口,
可选择Library、Cell、View。(注意:当只选择了Library时,会对这个Library中所有Cell的layout 进行操作。)
代码如下:
procedure(createXformPCellForm() let((libLabel cellLabel viewLabel libN cellN viewN browse grid form) libLabel = hiCreateLabel( ?name 'libLabel ?labelText "Library" ?justification 'right ) cellLabel = hiCreateLabel( ?name 'cellLabel ?labelText "Cell" ?justification 'right ) viewLabel = hiCreateLabel( ?name 'viewLabel ?labelText "View" ?justification 'right ) libN = ddHiCreateLibraryComboField( ?name 'libN ?callback "(ddsUpdateSyncWithForm)" ) cellN = ddHiCreateCellComboField( ?name 'cellN ?callback "(ddsUpdateSyncWithForm)" ) viewN = ddHiCreateViewComboField( ?name 'viewN ?callback "(ddsUpdateSyncWithForm)" ) browse = hiCreateFormButton( ?name 'browse ?buttonText "Browse..." ?callback "(ddsSyncWithForm (hiGetCurrentForm) 'browse 'libN 'cellN 'viewN)" ) grid = hiCreateGridLayout( 'grid ?items list( list( libLabel 'row 0 'col 0) list( cellLabel 'row 1 'col 0) list( viewLabel 'row 2 'col 0) list( libN 'row 0 'col 1) list( cellN 'row 1 'col 1) list( viewN 'row 2 'col 1) list( browse 'row 1 'col 2) list( 'col_stretch 0 0) list( 'col_stretch 1 1) list( 'col_stretch 2 0) ) ) form=hiCreateLayoutForm( 'abImportParasiticsForm "Create Xform PCell " grid ?sizePolicy 'horizontalExpanding ?callback "createXformPCell()" ) hiInstantiateForm(form) ddHiLinkFields( form->libN form->cellN form->viewN ) hiDisplayForm(form) );end let );end procedure procedure(createXformPCell() let((form libN cellN viewN obj) form = abImportParasiticsForm libN = form->libN->value cellN = form->cellN->value viewN = form->viewN->value obj = ddGetObj(libN) if(cellN != "" then cellList = list(cellN) viewN = viewN );end if if(cellN == "" then cellList = obj~>cells~>name viewN = "layout" );end if foreach(cellN cellList printf("Log:%N%N%N\n" libN cellN viewN) cellID = dbOpenCellViewByType(libN cellN viewN "" "r") dbCreateXformPCell(cellID libN) );end foreach );end let );end proc
可能会有Bug,未进行深入测试。