Get to know DataBase references' connections
Free drawing software for Windows, Mac OS X, and Linux
Brought to you by:
zbrown
Hi,
I am creating a dia2sql program in python:
https://github.com/SanPen/dia2sql/blob/master/dia2sql.py
So far, the only thing left to have a fully functional program is to properly detect the atributes of the tables that a reference entry is using.
The reference object has inside a property called "connections" with a list of objects with 3 properties:
My question is:
How does DIA interprete a schematic Reference so that it connects to the proper item graphically?
this would help me understand which attributes are beign connected.
*See attached a very simple diagram
Best regards,
Santiago
toobjects["02"].handles[0] --> objects["O3"].connections[13]
Last edit: Zander Brown 2020-08-18
Thanks a lot!
Can we assume that the connections are numbered always like that?
Since I try hard to ensure newer Dia can open files from older Dia yes it's a safe assumption that the numbering of connections for a given version of a given object type will remain the same - if they don't it's a bug
Hope that helps with your script
Zander, thank you for trying hard to ensure backwards compatibility. Some of these ".dia" files are filed away and then pulled out years later when an enhancement is needed. I don't even know what version originally created them. I noticed one had a reference to xmlns:dia and http://www.lysator.liu.se/~alla/dia/ but that site doesn't exist anymore. I tried to look at the "DummyDB.dia" file here, and it looks like binary. but the ".dia" filie I have is XML. I don't understand.
You probably saved the file with compression on
And yup, http://www.lysator.liu.se/~alla/dia/ is long dead, of course changing that url potentially breaks something somewhere so we are stuck with it