k p | 14 May 05:11
Picon

Re: dia-list Digest, Vol 97, Issue 11

2. Re: Dia for programming (Hans Breuer)


  4. Fw: Dia for programming (jrycman <at> gmail.com)

Essentially a diamond is a decision and an arrow will be a jump, branch or goto instruction.
Logical flow always stays the same (usually) but the syntax changes depending on chip used, hence a specific language setup is not really suited for me as I use quite a few different chips.

Generally only use about 4 different shapes.

Just reading up on custom shapes, that may do the trick.

Will report back

KP
jrycman | 12 May 02:24
Picon

Fw: Dia for programming

@kp

If I understand you correctly, a possible (alternative) solution may be to use ext-attributes to store the code.

http://dia-installer.de/doc/en/custom-shapes-chapter.html#N41016

Caveat: not sure whether "programatically access" includes Python scripting.

An additional benefit would be that you can double-click on the object to edit the code.
-----Original Message-----
From: Hans Breuer <hans <at> breuer.org>
Sender: dia-list-bounces <at> gnome.orgDate: Sat, 12 May 2012 00:38:29 
To: <dia-list <at> gnome.org>
Reply-To: discussions about usage and development of dia <dia-list <at> gnome.org>
Subject: Re: Dia for programming

At 09.05.2012 09:36, k p wrote:
> I use DIA mainly for my programming, which is mainly in assembler.
>
> I just wonder if the following would be possible by using Python in DIA ?
>
I dont quite get the model you have in mind, but it is certainly possible 
to do diagram to source code transformations with PyDia. See for example:
http://git.gnome.org/browse/dia/tree/plug-ins/python/codegen.py

> I would like to have it, so, there are essentially 2 identical layers, with
> one layer being the pseudo description (and flow diagram) and a second
> layer being where I enter the source code.
Like in a text editor? And you want to overlay the source code with the
diagram?

> I would then generate the complete source code from the source layer.
>
> Any logical flow change would result in a change the source layer.
A Dia Python plug-in can listen on object creation and removal. But it can 
not listen on any "logical flow change".

> My current thoughts are that with every shape added, it will automatically
> add one on each layer and then I would just need a way to click on each
> shape to send it to the background.
Now you have finally lost me ;)

> A menu button to send all pseudo or source layers to the for/background
> could be done a well.

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert
_______________________________________________
dia-list mailing list
dia-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia

1t1is2 | 12 May 02:11
Picon

Fw: Custom Shape <default-height> is not honored

Thanks Hans.

I discovered that after I sent the mail :-)
------Original Message------
From: Hans Breuer
Sender: dia-list-bounces <at> gnome.org
To: dia-list <at> gnome.org
ReplyTo: discussions about usage and development of dia
Subject: Re: Custom Shape <default-height> is not honored
Sent: May 11, 2012 18:08

At 10.05.2012 19:58, James R wrote:
> I have two custom shapes with a rectangle with a textbox.
> In the 1st shape, the textbox is sized to match the svg:rect.
> In the 2ns shape, the textbox is below the svg:rec.
>
> The 1st shape renders correctly by default - 3x1.
> The 2nd shape does not - it renders 3x2.5.
>
I guess you are expecting the size of the rectangle alone to be
like the the default size? If so you should not select resize="yes"
for the textbox, which adjust the shape size with the textbox included.
Using resize="no" should do the trick.

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert
_______________________________________________
dia-list mailing list
dia-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia

James R | 10 May 19:58
Picon

Custom Shape <default-height> is not honored

I have two custom shapes with a rectangle with a textbox.
In the 1st shape, the textbox is sized to match the svg:rect.
In the 2ns shape, the textbox is below the svg:rec.

The 1st shape renders correctly by default - 3x1.
The 2nd shape does not - it renders 3x2.5.

I've tried various combinations default-width, default-height, viewbox, changing the dimensions, etc.
All without success.

Any help would be appreciated.
go2null

<?xml version="1.0"?>
<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns" xmlns:svg="http://www.w3.org/2000/svg">
  <name>Rectangle - Text Inside</name>
  <icon>go2null_Rectangle_TextInside.png</icon>

  <aspectratio type="free"/>
  <default-width>3cm</default-width>
  <default-height>1cm</default-height>

  <svg:svg width="3cm" height="1cm" viewBox="0 0 3 1">
    <svg:rect style="fill:#cccccc; stroke:foreground; stroke-width:.1" x="0" y="0" width="30" height="10"/>
  </svg:svg>
  <textbox x1="0" y1="0" x2="30" y2="10" align="center" resize="yes"/>

  <connections>
    <point x="0" y="0"/>
    <point x="0" y="5"/>
    <point x="0" y="10"/>
    <point x="5" y="0"/>
    <point x="5" y="10"/>
    <point x="10" y="0"/>
    <point x="10" y="10"/>
    <point x="15" y="0"/>
    <point x="15" y="10" main="yes"/>
    <point x="20" y="0" />
    <point x="20" y="10"/>
    <point x="25" y="0"/>
    <point x="25" y="10"/>
    <point x="30" y="0"/>
    <point x="30" y="5"/>
    <point x="30" y="10"/>
  </connections>
</shape>


<?xml version="1.0"?>
<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns" xmlns:svg="http://www.w3.org/2000/svg">
  <name>Rectangle - Text Below</name>
  <icon>go2null_Rectangle_TextBelow.png</icon>

  <aspectratio type="free"/>
  <default-width>3cm</default-width>
  <default-height>1.4cm</default-height>

  <svg:svg width="3cm" height="1cm" viewBox="0 0 3 1">
    <svg:rect style="fill:#cccccc; stroke:foreground; stroke-width:.1" x="0" y="0" width="30" height="10"/>
  </svg:svg>
  <textbox x1="0" y1="10" x2="30" y2="14" align="center" resize="yes"/>

  <connections>
    <point x="0" y="0"/>
    <point x="0" y="5"/>
    <point x="0" y="10"/>
    <point x="5" y="0"/>
    <point x="5" y="10"/>
    <point x="10" y="0"/>
    <point x="10" y="10"/>
    <point x="15" y="0"/>
    <point x="15" y="10" main="yes"/>
    <point x="20" y="0" />
    <point x="20" y="10"/>
    <point x="25" y="0"/>
    <point x="25" y="10"/>
    <point x="30" y="0"/>
    <point x="30" y="5"/>
    <point x="30" y="10"/>
  </connections>

</shape>

k p | 9 May 09:36
Picon

Dia for programming

I use DIA mainly for my programming, which is mainly in assembler.


I just wonder if the following would be possible by using Python in DIA ?

I would like to have it, so, there are essentially 2 identical layers, with one layer being the pseudo description (and flow diagram) and a second layer being where I enter the source code.
I would then generate the complete source code from the source layer.

Any logical flow change would result in a change the source layer.
My current thoughts are that with every shape added, it will automatically add one on each layer and then I would just need a way to click on each shape to send it to the background.
A menu button to send all pseudo or source layers to the for/background could be done a well.

Like everyone else, it always problematic to maintain both documentation and source when they are in more than one place.

I'm NOT looking for a reverse operation, where you can enter the source and it will generate a flow diagram !

Any comments ?



Steffen Macke | 6 May 19:52
Gravatar

Updated Dia Development VM based on Ubuntu 12.04 Precise Pangolin

Hi,

an updated Dia Development VM is available from

http://dia-installer.de/developer/index.html

The VM now uses Ubuntu 12.04 Precise Pangolin and the VMWare Workstation 
8 format. It also comes with autodia and dia2code installed. The 
download size is approx. 46% smaller than the previous version (only 1.5 
GB).

This new version also has Python support enabled.

Regards,

Steffen
Steven Garcia | 6 May 07:02
Picon
Gravatar

UML Code Generator for PHP

Greetings and salutations,

I've extended the PyDia Code Generator from UML Diagrams to write Object Oriented PHP source code. Please, see the attached patch to codegen.py to this EMail. The patch was generated from a git clone of the Dia project: 'git diff > codegen-php.patch'. The patch may be applied from the root Dia project folder: 'patch -p1 < codegen-php.patch'. I'd be happy if you accept this contribution and add this as a feature to Dia. Thank you.


Kind Regards,

Steven Garcia
Attachment (codegen-php.patch): application/octet-stream, 7831 bytes
Kalle | 4 May 23:43
Picon

Dia in swedish

How come Dia isn't available in Swedish?

Jason Brower | 1 May 02:42
Picon
Gravatar

Linking to external documents in Dia or other alternatives...

Is there a way to take any object and give it a link to some external 
document?
I am a software architect that uses Dia on a daily basis.  I create 
many  diagrams to show siteflow, sourceflow, and model diagrams just to 
name a few.
The problem I have it when I start detailing the diagram in a document.  
Currently I use Abiword and I talk about, for example, the siteflow 
objects one by one detailing their information.  Though this works on 
the first run, I have a hard time keeping track of changes I have made 
to the documents to make sure I cover the changes I have made in the 
diagram.
I see two fixes for this, but this is left for discussion in the list if 
you have more.
* Create a way to put more information in a general format to the 
diagram objects and give me a way to export it to a document, like abiword.
* Build a way to link to a particular document from the Dia Object to 
another file so that I can visit it and instantly see the document 
information.

I personally like the first one as it would let me do all my 
documentation and updates from dia and I just export or change the view 
to see a document that details the information. All without loading a 
new program and needing to make sure linking will always work.

Enclosed are two documents I have that show the complexity of what I 
do.  This is an event management tool.  Everytime I make a change here I 
need to update the abiword docs to match.  It would be nice if it was 
all together and I could do a view change to see the information as if I 
was in abiword.

Best Regards,
Jason Brower
Attachment (model_diagram.dia): application/x-dia-diagram, 7043 bytes
Attachment (site_flow_diagram.dia): application/x-dia-diagram, 13 KiB
Slavko | 30 Apr 21:53
Face
Picon

Dia to SQL conversion

Hi,

i want to start with SQLite3 database modeling by dia. I am not UML, SQL
nor SQLite expert.

I found nice article for this
(http://left.subtree.org/2007/12/05/database-design-with-dia/), which
points me to Parse-Dia-SQL at CPAN and then i found that it has a official
debian's package and install it. After this i download sources of the
Parse-Dia-SQL, to get the dia examles and learn how things are working.

I was success to create SQL from my simple attempts, simple tables,
custom types (typemaps), default values, etc. But i am not
able find way to create FOREIGN KEY constraint for my relations. My
expectation is, that this will be created from UML associations (which i
take from rt53783.dia example.

I am not able to find other documentations or examples for this.

Please, are the FOREIGN KEY (and others) constraints supported? Only
PRIMARY KEY constrain works for me. And if yes, then can someone point me
to some docs, howtos, examples, or provide help to me?

thanks and regards

--

-- 
s pozdravom

Slavko
http://slavino.sk
Kerr, Janel | 29 Apr 18:32

Request to link to your website

Hello,

My name is Janel Kerr and I am an instructor in Engineering and Technology Education at the University of Idaho. I am also a contracted author with the International Technology and Engineering Educator's Association national curriculum, Engineering by Design. I would like to request permission to link to the following website in the curriculum guide for the course Technological Systems, 3rd Edition:

http://live.gnome.org/Dia

I would like to recommend your software as part of the internet resources section of this curriculum guide.

 

Thank you for your time.

Janel

Janel M. Kerr

MEd, MEd, Ed S P-T Ed
Instructor, Engineering and Technology Education
University of Idaho
College of Education - Curriculum and Instruction
Industrial Technology Education Building, Room 18C

Phone: 208-885-6685

 
 

Janel M. Kerr

MEd, MEd, Ed S P-T Ed
Instructor, Engineering and Technology Education
University of Idaho
College of Education - Curriculum and Instruction
Industrial Technology Education Building, Room 18C

Phone: 208-885-6685

 


Gmane