EDA365电子论坛网

标题: 如何report零件的页数资料? [打印本页]

作者: chloe_mei    时间: 2015-12-10 14:53
标题: 如何report零件的页数资料?
我有一个skill 可以report 零件的placebound height 高度,但我想再加上零件的页数在报告里,请问应该怎样做?
这是component height skill 的脚本

axlCmdRegister("height_rep" '_extract_report ?cmdType "general")
defun( _extract_report ()
let(list(last_line extract_commands extract_data report_file cmd_file ext_results f_report l_fields)
last_line = ""
extract_commands = "_tmp_extract.txt"        ;name of temp extract command file
extract_data = "_tmp_extract.dat"
report_file = "comp_height_report"

;Create the extract command file
cmd_file = outfile(extract_commands)
fprintf(cmd_file "GEOMETRY\n")
fprintf(cmd_file "REFDES!=\"\"\n")
fprintf(cmd_file "COMP_DEVICE_TYPE!=\"\"\n")
fprintf(cmd_file "CLASS = \"PACKAGE GEOMETRY\"\n")
fprintf(cmd_file "SUBCLASS=\"PLACE_BOUND_TOP\"\n")
fprintf(cmd_file "OR\n")
fprintf(cmd_file "SUBCLASS=\"PLACE_BOUND_BOTTOM\"\n")
fprintf(cmd_file "SUBCLASS=\"PLACE_BOUND_BOTTOM\"\n")

fprintf(cmd_file "REFDES\n")
fprintf(cmd_file "COMP_DEVICE_TYPE\n")
fprintf(cmd_file "GRAPHIC_DATA_NAME\n")
fprintf(cmd_file "SUBCLASS\n")
fprintf(cmd_file "GEO_PACKAGE_HEIGHT_MAX\n")
fprintf(cmd_file "GEO_PACKAGE_HEIGHT_MIN\n")

close(cmd_file)

axlExtractToFile(extract_commands extract_data '("quiet"))
ext_results = infile(extract_data)
f_report = axlDMOpenFile("ALLEGRO_REPORT" report_file "w")
while( gets(line_rd ext_results)
        l_fields=parseString(line_rd "!")
        if(car(l_fields)=="S" then
                unless(last_line==line_rd
                ;unless the line read matches the last line write it to the report.

                        fprintf(f_report "%s", line_rd)
                        last_line=line_rd                ;reset the last line value
                );end unless
        );end if
);end while
close(ext_results)
close(f_report)
;Clean up
deleteFile(extract_commands)        ;delete the view file
deleteFile(extract_data)                ;delete the raw data file
printf("Report complete.\n")
);end let
);end defun

谢谢
作者: XYX365    时间: 2015-12-10 14:58
但我想再加上零件的页数在报告里,请问应该怎样做?


=>你是說該零件在原理圖裡面是第幾頁嗎?

作者: chloe_mei    时间: 2015-12-10 15:06
是的,"FUNC_PHYSICAL_PATH"
谢谢

作者: XYX365    时间: 2015-12-10 15:20
本帖最后由 XYX365 于 2015-12-10 15:23 编辑
chloe_mei 发表于 2015-12-10 15:06
是的,"FUNC_PHYSICAL_PATH" 谢谢

你試試看在這一行close(cmd_file)前面,加入fprintf(cmd_file "FUNC_PHYSICAL_PATH\n")


  1. fprintf(cmd_file "GEO_PACKAGE_HEIGHT_MAX\n")
  2. fprintf(cmd_file "GEO_PACKAGE_HEIGHT_MIN\n")
  3. fprintf(cmd_file "FUNC_PHYSICAL_PATH\n")
  4. close(cmd_file)
复制代码



作者: chloe_mei    时间: 2015-12-10 15:27
我之前试了不行
作者: XYX365    时间: 2015-12-10 15:41
chloe_mei 发表于 2015-12-10 15:27
我之前试了不行

你是的原理圖是什麼?

另一個問題有可能FUNC_PHYSICAL_PATH所對應的值沒有導進PCB

作者: chloe_mei    时间: 2015-12-10 16:00
我的原理图是allegro design Entry HDL
PCB 里是有这值的
谢谢
作者: d0211    时间: 2019-4-8 16:02
好~感謝分享




欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/) Powered by Discuz! X3.2