Adding a user defined attribute to the standard line - or another line-object, that works the same as the regular line object, but with user definable attributes in dia?



Hi... I'm drawing some network diagrams with dia.  I would like to
automatically color the different objects on the diagram, depending on
what is working, what is semi-working, what is working, etc.....

I have a way of doing that.  Currently I have an external program,
that overlays its own lines on the .png / .jpg image exported from
Dia.  However.  If I change the dia file, move an object... I will
have to re-position all lines again, for the external program.

So I took a look at the compressed .dia file.  It is a list of XML
objects, and for some objects I could see a comment from the user.
So I thought:  What about the standard line-like objects?  line,
bezier-line, zig-zag line, etc... Could they have a user defined
comment inside them?  The current set of line-objects does not.  If
there were a user defineable comment area, one could do something
like:  "find the xml section defining this object, based on the
user-defined comment, change the color attribute, save file again, run
dia from command line, to export to .jpg / .png again, and voila!"
(run on a copy of the master .dia file, of course, so as not to mess
things up, *if* things go bad.)

So my question is:

1) Why do the standard objects not have a user-defineable comment
field?  Will they have such a field soon?

2) Is there a line-(like-)objects somewhere, that I could install in
Dia, works the same as the standard line-like objects, but has a user
defined comment field?  If so, where can I get it?

Regards,
--
EinarI


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]