Support Forum

Size of an object

Wednesday 12th December 2018
Hello, how do I find out via script which size the element in a cell has? For example, I have a star made by the schematic library. That star is created in a cell and I want to create an array of the stars but this depends on the size of the bounding box of the star itself. I was checking the members of the element and cell but I couldn't find anything suitable. Could you help me with that? Thanks a lot! David
Wednesday 12th December 2018
Hi David, there is a minimum and maximum method for a cell. So the size is its difference: ``` cell *c=layout->drawing->currentCell; // the size of the current cell is checked point min=c->minimum(); point max=c->maximum(); int sizeX=max.x()-min.x(); int sizeY=max.y()-min.y(); ```