How can I insert into my datas to mysql table?

I want myoutput Shapediver datas to insert into to Mysql Database with OnClick button function… is there a simple example for that?

What if it’s not simple?

1 Like

Joseph you always troll my questions… if it is not simple so maybe there is documantation for that?

Also it must be simple as that way…

connect database than

insert into dimensions , etc value dimension, etc where name = name,

if there is name than update …

But I asked for excat code

It’s not simple though.

There’s a plugin called Slingshot but Shapediver doesn’t support it and it’s dangerous to expose your database so that Shapediver’s server can access it. Most likely you would have another application entangled with Shapediver’s API and database management.

You may use C# codeblock as a workaround for Shapediver as .NET provides database-accessing capability. Still, it may not be the best practice.

rhino.compute is a probably a better choice than Shapediver.

When I put shapediver to my web page… it is not any differances from any html table… there is just a screen that draws something…

so with submit button Onclick event I think it must be easy to send html datas to mysql… also for drawing… submit button can take screenshot for it and send that screen shot to a folder with php code… I think you both wrong. I am working on code… if anyone know code please write down and help me… thanks

Ah. I got what you mean.

You may use libraries like jQuery to send data to your server, like this.

yes that is what I mean… I am trying to write down code… I am not expert but beginer so it takes time for me… I asked for if there is a prof here he can write down the code in max 2 min…

Have a look at the Data Output component in the Documentation which allows you to access model data through the API. There is also an example Grasshopper file to this model:

In order to get the NumberOutput data, use call below which returns a JSON object with relevant value.