Re: add attributes?



Hi,

Please do.  I read over that page, and am not sure where to start.  I get
the feeling I would need to start over and create a new .dia, and might be
limited to what objects I can use?  (like can I use the laptop object?)

You'll have to create custom shapes for all objects you want to use with the
custom description attribute. For special objects like the UML shapes this might
result in a loss of functionality. But e.g. all the Cisco objects
should be fine.

You can follow the instructions to add new shapes to Dia:

http://dia-installer.de/howto/create_shape/index.html

Instead of actually drawing a new shape, just create an empty diagram
and drag one of the shapes you need customized onto the diagram.

After exporting the shape, use a text editor to add the following in
line 3 of the *.shape file:

<ext_attributes>
  <ext_attribute name="Description" type="string" />
</ext_attributes>

You may also want to edit the <name></name> attribute in the file.

Now continue with adding the shape to a sheet (your custom sheet)?

Repeat for all the shapes you need.

Draw your diagram using your customized shapes. Enter the descriptions
through the object properties.

Export the shape using the attached updated PyDia List Generation
script. It will output shape names as well as the description
attributes. Shapes that don't have a custom description attribute will
be omitted.

Regards,

Steffen

Attachment: listgen.py
Description: Text Data



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