|
|
发表于 2014-8-19 08:17:17
|
显示全部楼层
- ;下面的代碼供你參考看看,是不是這樣的功能
- axlCmdRegister("vcr" 'fnViewComponentsReport)
- procedure(fnViewComponentsReport()
- let(()
- lComponents = axlDBGetDesign()->components
-
- tReportFile = axlTempFile()
- pWrite = outfile(tReportFile "w")
- fprintf(pWrite "Board File: %s\n" axlGetDrawingName())
- fprintf(pWrite "Date : %s\n\n" getCurrentTime())
- when(lComponents
- xIndex = 1
- fprintf(pWrite "%-6s %-15s %-20s\n" "NO." "REFDES" "LOCATION")
- fprintf(pWrite "========================================================================\n")
- foreach(dOne lComponents ;dOne = nth(0 lComponents)
- fprintf(pWrite "%-6d %-15s %-20s\n" xIndex dOne->name sprintf(nil "%L" dOne->symbol->xy))
- xIndex++
- )
- )
- close(pWrite)
- when(isFile(tReportFile)
- axlUIViewFileCreate(tReportFile "The components report" t list(75 25))
- )
- )
- )
复制代码 |
|