Trigger drawbot plugin trough script

I have a script for the Drawbot plugin, but I want to trigger directly from the scripts menu instead of open Drawbot window and paste the code.
Is it possible?

Thanks in advance

If you don’t need the UI of the plugin, you should be able to just import drawBot.

Sorry maybe I wasn’t clear.
I need the UI (the output/drawing area), but I want to open it directly from the script instead of opening from File>New Drawbot.

do you just need to open a new drawBot window or do you like to draw into it. The later is not possible.

Draw into it. :frowning: Because my script takes the instances weight value of the open fonts and draw the interpolation curve, just for visualize the progression.
What I want is to do more straight forward the use of the script. I don’t know if I can draw with vanilla.
Thanks anyway.

You can use the same commands that you use in a normal script in the drawBot, too.

Thanks Georg for all the help. One more little question (I think this is the last one).

I’m running the script from the Scripts menu, without the Drawbot UI, creates a pdf in my desktop. But when I run again the script. Drawbot draws on top of the last drawing. I need my scripts erase the previous drawing and draw in a blank page. I think this might be related to “drawBot.context” something that I saw on the console but I don’t know what it is.

Here I attach the script, because Im testing is not very “responsive” yet, instances with weight bigger than 180 are drawn outside of the canvas. (1.3 KB)

Thanks in advance. Regards.

That is a problem with the drawBot environment. I found the answer in this document:

add newDrawing() before size(w, h)

1 Like

Thank you Georg! Now it works! Thanks for the link to that pdf too.