How to use draw functions directly

If I put a function like DRAW.LINE into a cell directly nothing appears to show up. The value “true” is displayed in the cell, so I know it’s working but I cannot figure out where the image located. My assumption was that the line attributes aren’t being set such that maybe the line has a thickness of zero or a transparent color. So I tried “select shapes by selection rectangle” but that doesn’t find anything. Where do these shapes appear?

If I drag the line icon from shapes and then edit that, I can get it to work…but I really wanted to have the DRAW.LINE function appear in a cell so I could keep track of how things were drawn.

Hi JRD,

The DRAW functions are not implemented to work within a cell. The only way to make them work is via the shape tool.

It is possible to directly reference a cell via the Draw function. This way you have influence on the DRAW function, without it directly appearing on the sheet. Is that what you wanted to achieve?:slight_smile:

Cheers,

Tizian

Yes, when I drag the shape down, I’ve been putting cell references in. The problem is that any time that shape gets touched, the cell references are getting lost and I have to put the information back in again. I’ve started just using the functions in a cell (even though they don’t work), just to make the cutting/pasting process faster. I bet I’ve had to do this a hundred times…not difficult, but it’s getting tedious.

Additionally, I’m trying to draw multiple similar shapes (arrows representing wind vectors). It would be much easier to just copy a cell with a draw function in it to create the new shapes than to have to drag something down each time.

The attribute function description: ATTRIBUTES | Cedalo Platform
references a rectangle function example with lots of arguments not described in the actual rectangle function description:
=DRAW.RECTANGLE(“ID1”, “”, “Rect1”, 1000, 1000, 3000, 3000,ATTRIBUTES(,FALSE))

Those arguments kind of looked like what I wanted, that is, giving the shape a name and defining attributes which I was thinking was the step I might have been missing…but as I don’t see those args in the code, I’m thinking maybe the attribute page example is out-of-date.

Finally, I notice in the wind turbine example, the block which says “Wind simulation” has this in it: =DRAW.BEZIER(10669,3912,3488,671,"#ff9900")
Does what your saying mean that this text is meaningless? Or can I put the draw functions in a block like y’all did?

You are right. These are basically two problems.

  1. What happens after user manual input with references?
  2. How would one treat DRAW functions in cells.

We have talked about this internally a few times, but always decided, that we are not prioritizing this for the moment.

  1. We are not sure, if this behavior should be changed, or if it simply would not be able to change parameter e.g. x/y positions while a ref is set. Or if a dialogue should appear with a warning.
    But this would not help you in any way, because either, you are not able to move a shape or you would reset the ref.

  2. Setting DRAW functions in cells would result in further decisions, what would happen with DRAW functions in IF() functions and dependent of if cells. Would the deletion of a function result in a deletion of the shape? Etc.

I will have a look, if we could open talks on this topic again :slight_smile:

For now, what you could do is use the attribute parameter of a shape.
You are right, that the function is deprecated, because it is now directly used within the attribute’s submenu of the shape properties. Use the Visible parameter to hide shapes.
I strongly recommend, that you use a reference on the sheet. If you put in a static FALSE, there is no way to make the shape visible again.

You are also able to duplicate shapes via strg c/v or strg + drag.
I´m not sure what you meant by your example at the end, because I can´t see more parameter in the copied function, but maybe that is already covered by my answer above.

I hope that helps :slight_smile: