Direct python API to generate a diagram

Showing 1-6 of 6 messages
Direct python API to generate a diagram Al 5/1/12 4:04 PM
Is there any documentation (or doxygen) for creating sequence diagrams
directly from python code?
When all the relevant information (sequence diagram interactions)  are
already available in native form in python, it is simpler to call the
API to build the diagram rather then generate a .diag file and call
seqdiag to generate the image.

Thanks

  ~ Al
Re: [blockdiag-discuss] Direct python API to generate a diagram Komiya Takeshi 5/2/12 8:22 PM
Hi

Sorry, there are no documents for python codes.

You can use blockdiag API like this::

    from blockdiag import parser, builder, drawer

    tree = parser.parse_string(source)
    diagram = builder.ScreenNodeBuilder.build(tree)
    draw = drawer.DiagramDraw('PNG', diagram, filename="foo.png")
    draw.draw()
    draw.save()

This is another example using blockdiag API
(works at http://interactive.blockdiag.com/ )
https://bitbucket.org/tk0miya/blockdiag_interactive_shell

Regards,
Takeshi KOMIYA

2012/5/2 Al <aho...@gmail.com>:
Re: Direct python API to generate a diagram Al 5/4/12 2:23 PM
Hi Takeshi

Yes this works well after building the text description into a string.
Thanks and great library!

  ~Al
Re: Direct python API to generate a diagram Guy Halfon 9/3/12 2:31 AM

בתאריך יום שבת, 5 במאי 2012 00:23:17 UTC+3, מאת Al:
Re: Direct python API to generate a diagram Guy Halfon 9/3/12 2:37 AM
Hi, i have the same need,but these code end with an error: "
shape = r(node, self.metrics)
TypeError: 'NoneType' object is not callable
 
I used blockdiag-1.1.6
Do you know what is the cause of this error
can you help with send me more details about the code with blockdiag

בתאריך יום שבת, 5 במאי 2012 00:23:17 UTC+3, מאת Al:
Hi Takeshi
Re: [blockdiag-discuss] Re: Direct python API to generate a diagram Komiya Takeshi 9/7/12 4:56 AM
Hi,

This problem looks like no setuptools. Are you using it for setup?
blockdiag needs it for pluggable structure (entry_point feature).


2012/9/3 Guy Halfon <guy.ben...@gmail.com>: