I cannot seem to set the size of an ellipse in script.
It works for a rectangle but not an ellipse.
Here is my code.
DataPoint = addShape(myModuleName(),myPanelName(),1,"ELLIPSE","DataPoint1");
setValue("DataPoint1","size",10,10,"position",400,200,"fill","[solid]","visible",TRUE);
If I do a getValue() for size directly after this, the size is always reported as 1 and 1.
Also while we are at it, is there a definitive list of the property names for objects and the options for each property?
For example, background colour is backCol, however, I cannot locate where this is defined.
Another example is fill type. I had to mess about for a bit until I stumbled upon the magic string "[solid]".
How was i to know that the square brackets were required?
For me it is simply a matter of trial and (many) errors to get the correct text for the attribute.
This is frustrating and not very scientific.
setValue size not working for ellipse
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: setValue size not working for ellipse
In the WinCC OA Documentation it is described that you have to use the attribute "points" to set the size of the shape after using addShape().
At the WinCC OA Documentation you can also find information for the attributes which can be used, see CONTROL --> Control Graphics.
If you do not know the syntax for the "fill" string you can use the "Filltype Selector" in the CTRL script editor.
Best Regards
Leopold Knipp
Senior Support Specialist
At the WinCC OA Documentation you can also find information for the attributes which can be used, see CONTROL --> Control Graphics.
If you do not know the syntax for the "fill" string you can use the "Filltype Selector" in the CTRL script editor.
Best Regards
Leopold Knipp
Senior Support Specialist