logo

Thread

logo
the fair gds editor

Introduction
Screenshots
License
Download
Userinterface
Function Index
White Papers
Community
Contact

Use your OpenID:

getopenID

mouse left
no help

How to convert text into a polygon by a macro?

by anonymous - 28 Feb 2010, 1:19 CET

Hy, only a few bits and my first macro is ready. I've written one to get an array of text to adress structures for dose trials. The macro will place the text and afterwards it will convert it to a polygon. But every command I tried gives me an error message.

Here you can have a look to its interesting part:
...
for(cells=layout->drawing->firstCell; cells!=NULL; cells=cells->nextCell){
if(cells->thisCell!=NULL){
for(elements=cells->thisCell->firstElement;
elements!=NULL; elements=elements->nextElement){
if(elements->thisElement!=NULL){
//searching for text
if(elements->thisElement->isText()){
element = elements->thisElement;
//searching for text with an width < 0
if(element->getWidth()<0){
//setting width of the text
element->setWidth(size);
//but next one doesn't work, why?
element->toPolygon();
...

Maybe someone can help me, because that macro is very important to me.

THX

by Juergen Thies - 28 Feb 2010, 10:29 CET

Converting one text element to polygon will result in many polygon elements. So toPolygon() can not be part on any single element operation, but is part of a cell operation. So please use cell->toPolygonSelect() or cell->toPolygon() instead.

by anonymous - 28 Feb 2010, 11:09 CET

Thanks for replying so quickly. I thought I already tried that without success, but it works. Maybe it was a little bit too late for me ;o)

THX


Please log in to post!