This is my intention
A script that will
1.Go and place all the symbols w.r.to its Schematic page number
2. Draw a dynamic rectangle around the placed symbols
3. Place a Text indicating the Page #
I understand that I can do a script/skill combination to do this
I can go around finding the exact numbers of pages by just giving a number and looping through it
I see that the quickplace will create a log which has xy for the placed symbols, I could use it to determine the Rectangle size
Any ideas/suggestions are welcome, I am willing to code and share it in the forum
If my above idea sounds viable, I need some pointers on reading a text file using skill
Hi Here is a the script I am trying out but I am stuck.
Look at where I say /*Trouble*/
Any inputs/ thoughts are welcome and appreciated
;Get The start pointpointStart=axlEnterPoint()Px=xCoord(pointStart)Py=yCoord(pointStart); pick TOP/LEFT most only make sure that the database size is atleast 42000 30000lv.x = Pxlv.y = Py;Set noapp mode;sprintf(scrFile,"%s","replay foobar.scr")axlShell("noappmode") ;create layer board geometry/placebox make it visible unless(axlSetActiveLayer("BOARD GEOMETRY/PLACE_BOX") axlLayerCreateNonConductor("BOARD GEOMETRY/PLACE_BOX") );Set Visibility Template/StateorigStatus = axlVisibleGet()axlVisibleDesign(nil)axlVisibleLayer("BOARD GEOMETRY/PLACE_BOX" t)axlVisibleLayer("BOARD GEOMETRY/OUTLINE" t)axlVisibleLayer("PACKAGE GEOMETRY/SILKSCREEN_TOP" t)axlVisibleLayer("ETCH/TOP" t)axlVisibleLayer("PIN/TOP" t)axlVisibleUpdate(nil)placeStatus = axlVisibleGet(); Begin Outer For loop 1 to 6; Begin Inner forloop 1 to 8; preset turn on layers (outline/silk top/ top pad/placebox)axlVisibleSet(placeStatus)axlVisibleUpdate(nil); Draw line on board geometry/oulint from start point for ix 4000 lv.path = axlPathStart( list(lv.x:lv.y lv.x+4000:Py))axlDBCreatePath(lv.path "BOARD GEOMETRY/OUTLINE" 'line); Draw box on board geometry/placebox from start point ix 4000 -4000;bBox=list(list(lv.x lv.y) list(lv.x+4000 lv.y-4000))lv.bBox=list(list(lv.x lv.y) list(lv.x+4000 lv.y-4000))axlDBCreateRectangle(lv.bBox, nil, "BOARD GEOMETRY/PLACE_BOX" ); Add Text Page #lv.myorient = make_axlTextOrientation(?textBlock "9", ?rotation 90, ?mirrored nil, ?justify "left")pno = 3;lv.ttext = strcat("PAGE " sprintf(pnos "%L" pno))lv.ttext = sprintf(ttext "PAGE %L" pno)axlDBCreateText( lv.ttext,list(lv.x+150 lv.y-850), lv.myorient, "BOARD GEOMETRY/PLACE_BOX",nil) ;sprintf(schcmd1 "FORM sch_page_num view_tree 'MULTISEL YES' %L Sch_pagenum" pno) sprintf(schcmd1 "FORM quickplc page_num; setwindow form.sch_page_num; FORM sch_page_num view_tree 'MULTISEL YES' %L Sch_pagenum" pno ); quickplace page#axlShell("quickplace; setwindow form.quickplc; FORM quickplc place_page_num YES" )axlShell(schcmd1)/*Trouble*//* The Quickplace opens a main form and the skill shell is accessible, but when I click the schematic page numbers button and opens a child form, the skill shell is not accessible*/axlShell("setwindow form.quickplc")axlShell("FORM quickplc place_page_num YES") axlShell("FORM quickplc page_num") axlShell("setwindow form.sch_page_num");axlShell("FORM sch_page_num view_tree 'MULTISEL YES' 3 Sch_pagenum") ;axlShell("FORM sch_page_num view_tree 3 Sch_pagenum") axlShell(schcmd1)axlShell("FORM sch_page_num done") axlShell("setwindow form.quickplc")axlShell("FORM quickplc origin_select_mode YES") axlShell("FORM quickplc origin") axlShell("setwindow pcb")sprintf(schcmd2 "pick grid %L %L" lv.x+200 lv.y-200)axlShell("pick grid -4355.1968 11099.6709")axlShell("setwindow form.quickplc")axlShell("FORM quickplc bottom_edge YES") axlShell("FORM quickplc place") axlShell("FORM quickplc done"); set origin as xcoord + 100 , ycoord-100; place below the outline; Turn off all layers and turn on Board geometry/outline; Delete line selectboax xcoord-50 ycoord+50 xcoord+4050 ycoord-50; turn on preset layers; xcoord+4050; end Inner for loop; xcoord = original; ycoord-4050; End Outer for loop
In reply to vramanan:
I would like to work with you on this. Can you provide an email so we can discuss your SKILL program?
In reply to EvanShultz:
For What it is worth
Here is a working code, make sure to click on the TOP LEFT corner
This is just a quicker quickplace tool
rename qp.il.txt to qp.il
I am trying to optimize the above attached code, I want to not create an empty box if there is a skipped schematic page number
For that I have to ignore the non-existing page numbers
Is there a way I can read the log texts on the command window and process itFor example I am doing something and if I see a text "E- Value for field is not legal" then I want to something elseregardsVenkata
Hi if anone can help me on the following issue, it will be great
This is what I want to do
1. Open a text file (I know it)
2. line read til you match a pattern- Having trouble
3. once matched a pattern assign that line to a variable - (I know it)
p = infile("quickplace.log") text = gets(s p)while( !rexMatchp("^Placed 0 of 0" text) text = gets(text p))
This seems not to work
please help me
This works for me.
p = infile("quickplace.log")
rexCompile("^Placed 0 of 0")
In reply to aCraig:
I am not showing off but I have completed a Skill script that would help in quickly placing huge amount of components within a minute
and also will help in tracking their parents w.r.to it's page / parent hierarchy etc...
I have attached the presentation I did to my company, due to the amount of work involved , the time I spent as well some confidentiallity issues I can't post the entire code.
But this post might give some Ideas how it is done and what else is possible
Here is what I do in the skill file
1. Get all the component definition
2. Identify the logical path property
3. Parse it such that you create groups of different hierarchy and Pages
4. Once you have the list of all the hierarchies create lists for individual pages and their underlying components
5. Now place them with respect to their pages/hierarchies
6. calculate the new locations
7. For tracking their parent's assign properties on the symbol level and use the treeview interface to highlight them
I can give little bit more clues on the placement logic. search in google of 2D bin packing
although I used a variation of this logic
Basically I pre-sorted all the components w.r.to their size (you can either use place bound or pin count clue :-)!!!) on the individual pages
then I sort all the pages within a given hierarchy w.r.to their size and sort all the hierarchies w.r.to their size
Now I start on a given point and place the first component, since I pre-sorted it I am positive that the next member in that page is either same size or smaller than the first one.
Now I place the second one and compare its extends with my pre-defined Page box if it fits I place it or i place it on the next row.
This continues so-on and so forth for pages and hierarchies
I have attached the presentaion which will give you some ideas how it looks
I can answer your questions and give more info on the techniques but unfortunately I won't be able to post the entire code
I appreciate the understanding of this matter