Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Tom Benedict via 4D_Tech
I tried Miyako’s Structure to SVG tool and generated a fine structure.svg file. 
Now I’m trying to find a freeware tool to edit it. I’m trying Inkscape right 
now, but it’s very pokey (lots of “Not Responding” when selecting objects etc). 
Mostly unusable.

Any recommendations on free SVG editing tools? 

Tom

> On Nov 25, 2019, at 08:48, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Thank you for correcting me Miyako! I should have dug deeper.
> 
> I’ll check it out.
> 
> Tom Benedict
> 
>> On Nov 25, 2019, at 08:02, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> For reference:
>> 
>> I do not use native XSLT commands,
>> the component has a CLI xsltproc,
>> so the remarks “It is now deprecated” is incorrect in this instance.
>> 
>> https://github.com/miyako/4d-utility-structure-to-svg-converter-v2
>> 
>> 2019/11/25 22:00、Tom Benedict via 4D_Tech 
>> <4d_tech@lists.4d.com>のメール:
>> Miyako’s code requires XSLT, which is now deprecated, and I didn’t want to 
>> dive into modifying it to use
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Keisuke Miyako via 4D_Tech
I think he has already posted an explanation to this thread,
But the reason is that the colour by default (displayed grey in structure 
editor) is rgb(0,0,0)
So you need to code exceptions for tables that do not have a custom colour 
defined.

> 2019/11/26 8:42、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com>のメール:
> As for Alexander’s code, I noticed the following sometime ago. Maybe 
> something this simple is causing the blackness as well?




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Cannon Smith via 4D_Tech
Hi Tom,

As for Alexander’s code, I noticed the following sometime ago. Maybe something 
this simple is causing the blackness as well?

> Just a heads up on a bit of code that won’t work in countries that use a 
> decimal place instead of a comma. In the method xml_atts2ob, lines 50, 54, 
> 58, and 62 convert the decimal point in the height, left, top, and width of 
> the XML values to a comma. For values that have a decimal place, this can 
> make for some really, really big table widths and heights!

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Nov 25, 2019, at 6:00 AM, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Alexander’s code ended with a number of black tables.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Tom Benedict via 4D_Tech
Thank you for correcting me Miyako! I should have dug deeper.

I’ll check it out.

Tom Benedict

> On Nov 25, 2019, at 08:02, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> For reference:
> 
> I do not use native XSLT commands,
> the component has a CLI xsltproc,
> so the remarks “It is now deprecated” is incorrect in this instance.
> 
> https://github.com/miyako/4d-utility-structure-to-svg-converter-v2
> 
> 2019/11/25 22:00、Tom Benedict via 4D_Tech 
> <4d_tech@lists.4d.com>のメール:
> Miyako’s code requires XSLT, which is now deprecated, and I didn’t want to 
> dive into modifying it to use

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Keisuke Miyako via 4D_Tech
For reference:

I do not use native XSLT commands,
the component has a CLI xsltproc,
so the remarks “It is now deprecated” is incorrect in this instance.

https://github.com/miyako/4d-utility-structure-to-svg-converter-v2

2019/11/25 22:00、Tom Benedict via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Miyako’s code requires XSLT, which is now deprecated, and I didn’t want to dive 
into modifying it to use



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Herr Alexander Heintz via 4D_Tech
Am 25.11.2019 um 14:00 schrieb Tom Benedict via 4D_Tech <4d_tech@lists.4d.com>:
> 
> Alexander’s code ended with a number of black tables.

Hi Tom,

sorry for that, I take the color commands from the xml structure definitions.
If you like, you could send me the XML structure and I check if I can correct 
this in code.
In the list of tables you should see a preview of the color it will render 
with, although I do not remeber if I added the option to change the color.
I did it with a structure of 374 tables und a truckload of relations and it 
worked.
Also you can export as SVG and this can be edited in some drawing apps (I use 
Illustrator).

Regards,
Alex
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Tom Benedict via 4D_Tech
Thanks for the reply Arnaud,

Yes. I’ve tried the SVG exports posted on the forum and they run into issues, 
at least for me. Perhaps my structure is too large? 225 tables. 

My results with Vincent’s code have overlapped tables and relation lines which 
don’t line up correctly. 

Miyako’s code requires XSLT, which is now deprecated, and I didn’t want to dive 
into modifying it to use

Alexander’s code ended with a number of black tables.

My effort to stitch together screenshots involves 108 1920x1080 pictures, so 
even with Snagit’s panorama feature it takes hours of manual work. Perhaps I 
should have used that time to write code instead.

I guess that printing an ERD is not common among 4D developers.

Tom Benedict  

> On Nov 25, 2019, at 00:42, Arnaud init5 imap via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 
> 
>> Le 24 nov. 2019 à 18:54, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com 
>> > a écrit :
>> 
>> [...]
>> To that end, I’m investigating whether there is a way to use the XML file 
>> that 4D creates via the EXPORT STRUCTURE command in a non-4D tool (like SQL 
>> Server Management Studio, MySQL Workbench etc) to create an Entity 
>> Relationship Diagram which I can manipulate and print.
> 
> Hi Tom, 
> have you seen these? 
>  >
>  >
> Using the export structure file to draw structure with SVG. 
> 
> If often use yEd, I like it's automatic redrawing. But I use it before 
> working in 4d, not after until now, I don't know how to "import" 4d structure 
> with it. 
> 
> -- 
> Arnaud de Montard 

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Arnaud init5 imap via 4D_Tech


> Le 24 nov. 2019 à 18:54, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com 
> > a écrit :
> 
> [...]
> To that end, I’m investigating whether there is a way to use the XML file 
> that 4D creates via the EXPORT STRUCTURE command in a non-4D tool (like SQL 
> Server Management Studio, MySQL Workbench etc) to create an Entity 
> Relationship Diagram which I can manipulate and print.

Hi Tom, 
have you seen these? 
>
>
Using the export structure file to draw structure with SVG. 

If often use yEd, I like it's automatic redrawing. But I use it before working 
in 4d, not after until now, I don't know how to "import" 4d structure with it. 

-- 
Arnaud de Montard 





**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Herr Alexander Heintz via 4D_Tech
Am 24.11.2019 um 18:54 schrieb Tom Benedict via 4D_Tech <4d_tech@lists.4d.com>:
> 
> I have a 4D method which generates a SQL DDL, but it doesn’t include 
> relations. So now I’m looking at the XML structure file as a possibility. 

Look at my Blog
http://blog.heintz.net/sql-structure-access/ 

This does export your structure as SQL table definitions, although without the 
relations (Foreign Key Constrains in MySQL speak).
Source available for a small donation.

Adding the export of the constrains should not be too hard, maybe I could do it 
if you really want to, otherwise here is the syntax:

FOREIGN KEY (PersonID) REFERENCES Persons(PersonID)

Easy as pie :-)

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Create SQL DB ERD from 4D Export Structure XML File?

2019-11-24 Thread Tom Benedict via 4D_Tech
I’d like to use an external data modeling tool to display my 4D structure file. 
Ultimately I want to print the 4D Structure. I’ve tried all the 4D components 
and scripts and they all seem to have shortcomings. Right now I’m in the middle 
of a tedious screenshot, export, panoramic merge in SnagIt process which is 
fragile. I’m losing interest in that process and am hoping for something that 
is repeatable.

To that end, I’m investigating whether there is a way to use the XML file that 
4D creates via the EXPORT STRUCTURE command in a non-4D tool (like SQL Server 
Management Studio, MySQL Workbench etc) to create an Entity Relationship 
Diagram which I can manipulate and print.

I have a 4D method which generates a SQL DDL, but it doesn’t include relations. 
So now I’m looking at the XML structure file as a possibility. I’ve tried to 
work with it in XMLSpy, but I don’t know enough about XSD, XSL, DTD and XML to 
make much headway.

Has anyone else done this?

Thanks,

Tom Benedict
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**