pyecore icon indicating copy to clipboard operation
pyecore copied to clipboard

graphical representation

Open fkgl opened this issue 4 years ago • 4 comments

Hi, Is it possible to visualise the graphical representation of the Metamodel using pyecore?

fkgl avatar Jun 05 '21 07:06 fkgl

Hi @fkgl,

Sorry for the late answer, I didn't receive notification. At the moment, there is no way of visualizing a graphical representation of a metamodel using PyEcore. For that, a small script using PyEcore would be required. I made a quick test yesterday and it should be fairly easy to generate plantuml syntax from a metamodel. I will try to propose a quick and dirty gist for it as soon as possible :)

Thanks for the proposal!

aranega avatar Jun 08 '21 07:06 aranega

Hi @aranega,

Thanks for your reply

good luck.

fkgl avatar Jun 08 '21 08:06 fkgl

I had a little bit of time this morning, so I quickly coded this small script: https://gist.github.com/aranega/eca9c8fbbd87b2f9c70317da53676ac6

You can use it this way

python plantumlgen.py mymetamodel.ecore

It will print PlantUML code, you can redirect it to a file, directly compile it with plantuml if you have it installed.

python plantumlgen.py mymetamodel.ecore > visu.plantuml && plantuml -tpng visu.plantuml

aranega avatar Jun 08 '21 09:06 aranega

Thank you very much for your efforts and for giving me some of your time. I will try it.

Best regards.

fkgl avatar Jun 08 '21 12:06 fkgl