hi,all how to get component (or symbol) 's center coordinate? thanks haojingchao .chinese
Hello MicroHelp, ------------------------------ ;obtain component dbid axlSetFindFilter( ?enabled list("noall" "components") ?onButtons list("components") ) axlSelect( ?groupMode nil ?prompt "Please Select Component" ) ;user clicks component component_dbid = axlGetSelSet() ;now use bBox to find center component_bBox = component_dbid->bBox ; ( (LowerLeft_X,LowerLeft_Y) (UpperRight_X,UpperRight_Y) ; now just write code to obtain center ------------------------------ Also possible is component_position = component_dbid->xy however I'm not sure if this will get the 'center' of component regards, Newbie
thanks very much, let me test; microhelp .chinese
Hi All, Attached is a skill file that draws the bBox of a symbol on the BOARD GEOMETRY/OUTLINE layer. to use it 1. Place ShowbBox.il in your skill directory 2. Type "skill" on command prompt Command> skill 3. Type " load "ShowbBox.il" " Skill> load "ShowbBox.il" 4. Type "exit" Skill> exit 5. Type "ShowbBox" and click on symbol you want to display the bBox Command> ShowbBox What i noticed is that sometimes the bBox rectangle isnt 'centered' on the symbol. Does anyone know why this is so? this will also mean that we cant really use the bBox of symbol to find center of component... sorry microhelp I know that using "location" doesnt work as it will be the "origin" of the component when it was created by the librarian. Does anyone have a better suggestion as to how to find the center of a component? thanks newbie
correct file please use this
This solution won't work if symbol objects are outside the Assembly outline. A better solution would be to take all the Assembly outline objects of the symbol and find the centre of those.