Support Forum

How can I get the cellname for an sElement?

Ted

Tuesday 5th October 2021
I don't see anything in the API. Looking through the 'examples' folder, 'schematic-parameter.layout' shows that you can use getParameter("cellname") and getParameter("devicename"), but only getParameter("devicename") seems to work. getParameter("cellname") always returns an empty string. In the documentation, at https://www.layouteditor.org/layoutscript/api/selement#5 > string sElement::getParameterList() is descripted as returning a string, but it actually returns a stringList. getParameterList() does not seem to include "devicename". Are there any parameter names besides "devicename" that can be used with getParameter?
J├╝rgen
LayoutEditorFull
Tuesday 5th October 2021
Thanks for pointing to these issues. The example macro and the macro interface was a bit outdated. A parameter *cellname* is no longer in use. The line in the *schematic-parameter.layout* file should now be: ``` string s1=el->thisElement->getComponent()->getName(); ``` The function *getComponent* will be available with the development releases 20211005 available for download [here](https://layouteditor.com/download?release=latest) later today. The manual on the function *getParameterList* was corrected.
Ted

Tuesday 5th October 2021
Fantastic. Thanks.