Demonstration of pgf-umlsd.sty, a set of convenient macros for drawing UML sequence diagrams.
To compile the example you will need the following style file:
The macros are documented in the style file.
Update: pgf-umlsd is now hosted at Google code.
Author: | Xu Yuan, Southeast University, China |
---|
Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the
LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.
En français: TeXnique.fr.
% Demonstration of pgf-umlsd.sty, a set of convenient macros for drawing
% UML sequence diagrams. Written by Xu Yuan <xuyuan.cn AT gmail.com> from
% Southeast University, China.
% The project is hosted at Google code: http://code.google.com/p/pgf-umlsd/
\documentclass{article}
\usepackage{tikz}
\usepackage{pgf-umlsd}
\usepgflibrary{arrows} % for pgf-umlsd
\begin{document}
\begin{figure}
\centering
\begin{sequencediagram}
\newthread{ss}{}{SimulationServer}
\newinst{ctr}{}{SimControlNode}
\newinst{ps}{}{PhysicsServer}
\newinst[1]{sense}{}{SenseServer}
\begin{call}{ss}{Initialize()}{sense}{}
\end{call}
\begin{sdloop}{Run Loop}
\begin{call}{ss}{StartCycle()}{ctr}{}
\begin{call}{ctr}{ActAgent()}{sense}{}
\end{call}
\end{call}
\begin{call}{ss}{Update()}{ps}{}
\begin{call}{ps}{PrePhysicsUpdate()}{sense}{state}
\end{call}
\begin{callself}{ps}{PhysicsUpdate()}{}
\end{callself}
\begin{call}{ps}{PostPhysicsUpdate()}{sense}{}
\end{call}
\end{call}
\begin{call}{ss}{EndCycle()}{ctr}{}
\begin{call}{ctr}{SenseAgent()}{sense}{}
\end{call}
\end{call}
\end{sdloop}
\end{sequencediagram}
\caption{UML sequence diagram demo.}
\end{figure}
\begin{figure}
\centering
\begin{sequencediagram}
\newthread{ss}{}{SimulationServer}
\newinst{ps}{}{PhysicsServer}
\newinst[1]{sense}{}{SenseServer}
\newthread[red]{ctr}{}{SimControlNode}
\begin{sdloop}[green!20]{Run Loop}
\mess{ctr}{StartCycle}{ss}
\begin{call}{ss}{Update()}{ps}{}
\prelevel
\begin{callself}{ctr}{SenseAgent()}{}
\begin{call}[3]{ctr}{Read}{sense}{}
\end{call}
\end{callself}
\prelevel\prelevel\prelevel\prelevel
\setthreadbias{west}
\begin{call}{ps}{PrePhysicsUpdate()}{sense}{}
\end{call}
\setthreadbias{center}
\begin{callself}{ps}{Update()}{}
\end{callself}
\begin{call}{ps}{PostPhysicsUpdate()}{sense}{}
\end{call}
\end{call}
\mess{ss}{EndCycle}{ctr}
\begin{callself}{ctr}{ActAgent()}{}
\begin{call}{ctr}{Write}{sense}{}
\end{call}
\end{callself}
\end{sdloop}
\end{sequencediagram}
\caption{Example of a sequence with parallel activities.}
\end{figure}
\end{document}
Comments
pgf-umlsd.sty is wrong. It is giving me errors
Apparently pgf-umlsd.sty is not compatible with the CVS version of PGF. I will inform the author about this issue.
Update. pgf-umlsd.sty has been updated and is now compatible with the CVS version of PGF. You can find the new version here: http://code.google.com/p/pgf-umlsd/source/browse/#svn/trunk
Note: The code on this page is not fully compatible with the new version. I will update the example soon.
I am having difficulties to compile basic examples from
https://haspe.homeip.net/projekte/ddi/browser/tex/sty
Any advice on this?
@Juhana Do you mean the file pgf-umlsd-demo2.tex? To run that you'll need the pgf-umlsd.sty file. If you run a CVS version of PGF you'll need version 0.3. If you are using PGF 2.0 you'll probably need version 0.2.
Hi Thanks for a speedy response. I am trying to compile the basic example from http://pgf-umlsd.googlecode.com/files/pgf-umlsd-0.3.tar.gz
but I am not succesful. I am getting the following errors
! Use of \t doesn't match its definition. \tikz@scan@no@calculator ...\edef \tikz@temp {(#2) }\expandafter \tikz@@scan@... l.44 \end{sequencediagram}
?
! Package PGF Math Error: Unknown function `inst'.
See the PGF Math package documentation for explanation. Type H for immediate help. ...
l.44 \end{sequencediagram}
?
! Package PGF Math Error: Unknown function `inst'.
See the PGF Math package documentation for explanation. Type H for immediate help. ...
l.44 \end{sequencediagram}
Errors keep comming if I try to supperess them with enter. I am using MikTex Latex on windows Vista. This is too bad since I would use a figure like in the above picture.
To run the 0.3 release of pgf-umlsd you need a recent CVS version of PGF. If you are using Miktex you are probably running PGF 2.0. Try using the 0.2 release of pgf-umlsd instead.
Hi I was happy to find a LaTeX tool to set sequence diagrams within my project requirements. I am using MikTEX 2.7 and tryed the above example with mor than 100 errors
What did I wrong?
Thanks for your help RON
@Ron. It is difficult to know what the problem is without more details. Have you downloaded the pgf-umlsd.sty file? Have you updated PGF to 2.0 or later? Some of the hints in the above comments may also apply to your case.
Great Tool, you have made! Is there a possibility to increase the vertical space between the self calls, or to configure the variables defining it? Thanks :) Thomas
@Thomas. I don't know if Xu Yuan monitors this page. pgf-umlsd has a dedicated Google code project page. There you can file feature requests or contact the author directly.
hi, I'm trying use \usepackage{pgf-umlsd} on Miktex 2.7, because pgf-umlsd there isn´t at browse repository. I did this:
1.- I make a directory with name "pgf-umlsd" at this path "C:\Program Files\MiKTeX 2.7\tex\latex\pgf-umlsd"
2.- I copy the file pgf-umlsd.sty inside at above directory
But he doesn´t works. he doesn´t file sty, where Miktex search?.
Anybody have pgf-umld works? and whom environment. Anybody runs on kile?
Thanks in advanced!!
ok, this works, only need update Miktex's repository.
Miktex settings -> general -> manteinance -> button Refresh FNBD. And miktex found the sty file.
My compiling pgf-umlsd-demo.tex generates the following error message:
This error message remains the same no matter what version (0.2, 0.3, 0.4) I use. I also checked out the latest pgf using
After texhash, the problem remains. Actually in the checked out files, there is no `pgflibrarytikzshadows.code.tex' either.
I am using openSUSE 11.1 with texlive. Could anyone please help me with this?
The shadows library was added in PGF 2.0. The problem could be that you are running PGF 1.18. Are you using texlive 2008? If not, you could try upgrading, because PGF 2.0 is included.
I have the same problem as ron. I have copied the code from this page here in a new latex file. Moreover I have put the pgf-umlsd.sty in the same folder as this Latex file. If I press make I get 101 errors.
I'm using MikTex 2.7.
As Kjell already answered: Everyone who's using MikTex 2.7 should try v0.2 - This will work without errors.
Hey guys, thanks for your feedback. Version 0.5 is just released!
The Message Sequence Chart (MSC) is also quite flexible and is worth checking out.
http://www.win.tue.nl/~sjouke/misc/mscpackage/
Thx for this! It works incredibly well! The example runs only with the old style file from google code (0.2 I think). But then it rocks the house! Please make more macro packages like this one! It is easy to use and even easy to read. Instructional and practical... nice!
Nice software, good work!
Version 0.2 works fine!
I love music like "Queen". What about you?
http://manual-profi.ru/img/foto2.png
Мануальная терапия и массаж – мероприятия, популярные в медицине в наше время. Но необходимо учитывать, что работать с вами обязаны только опытные медицинские работники. С помощью мануальной терапии возможно излечиться от массы недугов, но только если проводить процедуры будет действительно медицинский работник. Дмитрий Пахомов – настоящий мастер своей профессии - профессионального массажа, имеет действительно профильное образование и более десятилетия опыта работы по специальности.
лечение сколиоза массажем
лечебный массаж позвоночника
Массажист проводит услуги профессионального массажа на дому, если по каким-то обстоятельствам вы не смогли попасть к этому специалисту на приём, или возможен массаж в других удобных как раз для вас местах (офис, сауна и т.п.). Постоянные клиенты могут заказать массажиста с целью постоянного обслуживания в командировках, путешествиях и т.д.
методики лечебного массажа
техника баночного массажа
Adding comments is currently not enabled.