- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
PROTEL布局转换为Allegro问题!
录入:edatop.com 点击:
如果已经在Protel作了PCB布局的工作,Allegro的script功能可以将Protcl中的布局在Allegro中重现出来。在Protel中,设计师可以输出一个Place & Pick文件,这个文件中包含了每个器件的位置、旋转角度和放在PCB顶层还是底层等信息,可以通过这个文件很方便的生成一个Allegro的script文件,在Allegro中执行这个script就能够重现Protel中的布局了,下面给出了完成Place & Pick文件到Allegro Script文件转化的C++代码,笔者使用这段代码,仅用了数分钟就将一个用户有800多个器件的PCB板布局在Allegro重现出来。
FILE *fp1, *fp2;
::AfxMessageBox("hello");
fp1=fopen("pick.txt", "rt");
if (fp1==NULL) ::AfxMessageBox("Can not open the file!");
fp2=fopen("place.txt","wt");
if (fp2==NULL) ::AfxMessageBox("Can not create the file!");
char refdes[5], Pattern[5];
float midx,midy,refx,refy,padx,pady,rotation;
char tb[1];
char tmp='"';
fprintf(fp2,"%sn", "# Allegro script");
fprintf(fp2,"%sn", "version 13.6");
fprintf(fp2,"%sn", "place refdes");
while (!feof(fp1)) {
fscanf(fp1,"%s", refdes);
fscanf(fp1,"%s", Pattern);
fscanf(fp1,"%f", &midx);
fscanf(fp1,"%f", &midy);
fscanf(fp1,"%f", &refx);
fscanf(fp1,"%f", &refy);
fscanf(fp1,"%f", &padx);
fscanf(fp1,"%f", &pady);
fscanf(fp1,"%s", tb);
fscanf(fp1,"%f", &rotation);
fprintf(fp2, "fillin %c%s%c n",tmp,refdes,tmp);
if (rotation!=0) {
fprintf(fp2, "rotaten");
fprintf(fp2, "iangle %fn", rotation);
};
char yy=tb[0];
if (yy!='T') fprintf(fp2, "pop mirrorn");
fprintf(fp2, "pick %f %f n", padx,pady);
fprintf(fp2, "next n");
};
fprintf(fp2, "done");
fclose(fp1);
fclose(fp2);
请问以上C++代码是通过什么平台执行然后进行PICK文件转换的啊?求大神解答。
相同的可以在本网站实现,可是要连网啊!公司内网连不了网,所以用起来很不方便,有没有小工具、SKILL之类是可以直接转换的?
FILE *fp1, *fp2;
::AfxMessageBox("hello");
fp1=fopen("pick.txt", "rt");
if (fp1==NULL) ::AfxMessageBox("Can not open the file!");
fp2=fopen("place.txt","wt");
if (fp2==NULL) ::AfxMessageBox("Can not create the file!");
char refdes[5], Pattern[5];
float midx,midy,refx,refy,padx,pady,rotation;
char tb[1];
char tmp='"';
fprintf(fp2,"%sn", "# Allegro script");
fprintf(fp2,"%sn", "version 13.6");
fprintf(fp2,"%sn", "place refdes");
while (!feof(fp1)) {
fscanf(fp1,"%s", refdes);
fscanf(fp1,"%s", Pattern);
fscanf(fp1,"%f", &midx);
fscanf(fp1,"%f", &midy);
fscanf(fp1,"%f", &refx);
fscanf(fp1,"%f", &refy);
fscanf(fp1,"%f", &padx);
fscanf(fp1,"%f", &pady);
fscanf(fp1,"%s", tb);
fscanf(fp1,"%f", &rotation);
fprintf(fp2, "fillin %c%s%c n",tmp,refdes,tmp);
if (rotation!=0) {
fprintf(fp2, "rotaten");
fprintf(fp2, "iangle %fn", rotation);
};
char yy=tb[0];
if (yy!='T') fprintf(fp2, "pop mirrorn");
fprintf(fp2, "pick %f %f n", padx,pady);
fprintf(fp2, "next n");
};
fprintf(fp2, "done");
fclose(fp1);
fclose(fp2);
请问以上C++代码是通过什么平台执行然后进行PICK文件转换的啊?求大神解答。
相同的可以在本网站实现,可是要连网啊!公司内网连不了网,所以用起来很不方便,有没有小工具、SKILL之类是可以直接转换的?
没有人知道吗?!?!?!
同求啊~~~~!希望高手今早出现啊~!