|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
本帖最后由 shirdon 于 2022-8-25 13:30 编辑
allegro导出元件高度list。生成excel,09年写的17.4还能用,不错
快捷命令:CHExport
- ; =============================================================
- ; Comp_height_export.il v.1
- ; Create by XD
- ; 2009-10-21
- ;=============================================================
- ;Declare: display all placed component height!
- (defun Comp_height_export ()
- symbol_db_list= axlDBGetDesign()->symbols
-
- comp_num= length(axlDBGetDesign()->components)
-
- axlClearSelSet()
- _Comp_Height_Report = outfile("./Comp_height_report.csv" "w")
-
- fprintf(_Comp_Height_Report ",,Comp_height_report V1.0\n\n")
-
- fprintf(_Comp_Height_Report "======================================================================\n")
-
- fprintf(_Comp_Height_Report "* BoardFile Name: %s Allegro Version: %s\n" axlCurrentDesign() axlVersion('fullVersion))
-
- fprintf(_Comp_Height_Report "* Time: %s\n" getCurrentTime())
-
- fprintf(_Comp_Height_Report "* The Number of Component: %d\n" comp_num)
- fprintf(_Comp_Height_Report "* Remark: Please make sure that all components have been placed on the main board!\n")
- fprintf(_Comp_Height_Report "======================================================================\n")
- fprintf(_Comp_Height_Report "Refdes,Footprint,Height_Max,Layer\n")
- setof(symbol_db symbol_db_list
-
- refdes = symbol_db->refdes
-
- if( (refdes!=nil) then
-
- mir = symbol_db->isMirrored
-
- if(mir then
-
- Fl = "Bottom"
-
- else
-
- Fl = "Top"
-
- )
-
- shapefound=0
-
- propfound=0
-
- twoshapes=0
-
- shape_bot_found=0
-
- children_db_list = symbol_db->children
-
- if( neq(children_db_list nil) then ; checks if symbol has attached shapes
-
- setof(children_db children_db_list
-
- isShape = children_db->objType
-
- shape_layer = children_db->layer
-
- if( equal(isShape "shape") then ; checks if shape is on package geometry/place_bound_top
-
- if( equal(shape_layer "PACKAGE GEOMETRY/PLACE_BOUND_TOP") then
-
- shapefound=1
-
- if( (shape_bot_found==1) then
-
- twoshapes=1
-
- );end if
-
- proplist= axlDBGetProperties(children_db)
-
- foreach(prop proplist
-
- propS= symbolToString(car(prop))
-
- if( (propS=="PACKAGE_HEIGHT_MAX") then
-
- fprintf(_Comp_Height_Report "%s,%s,%s,%s\n" refdes symbol_db->name cadr(prop) Fl)
-
- propfound=1
- );end if
-
- );end foreach
-
- ) ; end if package geometry
-
- if( equal(shape_layer "PACKAGE GEOMETRY/PLACE_BOUND_BOTTOM") then
-
- if((shapefound==1) then
-
- twoshapes=1
-
- );end if
-
- shapefound=1
-
- shape_bot_found=1
-
- proplist= axlDBGetProperties(children_db)
-
- foreach(prop proplist
-
- propS= symbolToString(car(prop))
-
- if( (propS=="PACKAGE_HEIGHT_MAX") then
-
- fprintf(_Comp_Height_Report "%s,%s,%s,%s\n" refdes symbol_db->name cadr(prop) Fl)
-
- propfound=1
- );end if
-
- );end setof
-
- ) ; end of package geometry
-
- ) ; end of is shape
-
- ) ; end of setof
-
- ) ; end of if children
-
-
- if( (shapefound==0) then
-
- printf( "%L has no Place bound shape! \n" refdes)
-
- Entries=1
- );end if
-
- if( (propfound==0) then
-
- printf("%L has no Place bound height property! \n" refdes)
-
- Entries=1
-
- );end if
-
- if( (twoshapes==1) then
-
- printf("%L has two Place_bound shapes! May highlight improperly!! \n" refdes)
-
- Entries=1
-
- );end if
-
- );end if refdes=nil
-
- ) ; end of foreach symbol_db
- close(_Comp_Height_Report)
- axlHttp("Comp_height_report.csv")
- )
- axlCmdRegister( "CHExport" 'Comp_height_export)
复制代码 显示结果:
|
|