Re: add attributes?
- From: Steffen Macke <sdteffen gmail com>
- To: discussions about usage and development of dia <dia-list gnome org>
- Subject: Re: add attributes?
- Date: Sun, 8 Feb 2009 12:28:43 +0100
Hi,
1. Define new attributes.
2. Set attribute values on objects. These 3 attributes would now be part of
I think this is already possible. Have a look at the "Extended
Attributes" of custom
shapes in the Dia Manual:
http://dia-installer.de/doc/en/custom-shapes-chapter.html#N40FD5
These extended attributes are accessible in python.
Example:
* Add an extended attribute called "Description" to a shape.
* Create a new diagram
* Add your new shape
* Edit the object properties and write a description
* Use the following statement in the Python Dia Console:
dia.active_display().diagram.data.layers[0].objects[0].properties['custom:Description'].value
I hope that this information is sufficient for you to create such
custom shapes and adjust
the python export script. If not, I should post a sample.
Regards,
Steffen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]