Visio Guy

Visio Guy Website & General Stuff => User-submitted Stuff => Topic started by: Yacine on September 03, 2013, 07:37:38 PM

Title: Using SQL to edit drawings
Post by: Yacine on September 03, 2013, 07:37:38 PM
This morning on my way to work, I tought about a tool which might be very cool and easy to implement:
a SQL data editor.
Let's say you have in a docking window a memo field in which you type (or load) commands.
These commands would be plain SQL.
On clicking an execute button (or before), you'd export your drawing to a database (they are generally quite fast), modify the data of the drawing and re-import.
Even tree structures could be translated in parent-child structures of a relational DB.

As possible applications, you could do:
- SELECT * from shps WHERE prop.XYZ="ABC" --> and get those shapes selected
- UPDATE prop.Field1 set 1 WHERE ThisAndThat --> and set the field1 to whatever complexe value you want
- UPDATE shp.pinX set 230 WHERE shp.prop.tag = "Valve" --> even modify the arrangements of your shapes
- INSERT Connectors and link them to shapes
- Export to a table, edit however and re-import.
- Do Reports,.... Endless!

The main advantage being, that you won't need to develope an own language or syntax. You profit from the whole richness and stability of SQL.

The tool can probably be written in less than a week, as everything is already available.

On might even think about restricting the syntax by dialogs (eg specific selection dialogs, only modifications, etc...) to hide the technical background to normal users.

What do you think about it?

Cheers, Yacine.
Title: Re: Using SQL to edit drawings
Post by: Zigoto on January 17, 2014, 11:47:20 AM
Quote from: Yacine on September 03, 2013, 07:37:38 PM

The tool can probably be written in less than a week, as everything is already available.


hello Yacine
not yet done  :D ?
Ziorg
Title: Re: Using SQL to edit drawings
Post by: Yacine on January 18, 2014, 08:33:03 AM
LOL. Did not get the necessary week yet.
Would you be interested?