file Export UML as Excel

1 year 6 months ago #5805 by joset
Hi,

I need to export the UML (classes+attributes) content to Excel.

Is the a way to load POI.JAR ? Or any other means ?

Thank you for helping, José Torres

Please Log in or Create an account to join the conversation.

1 year 5 months ago #5820 by ebr
Hi Joset,

You can develop a modeule (in Java) or a script (in Jython) to do so.
What will be your format?

Best Regards,
EBR

Please Log in or Create an account to join the conversation.

1 year 1 month ago #5918 by joset
Hi ok but how to locally deploy POI and next import it into jython ?

thx

Please Log in or Create an account to join the conversation.

1 year 1 month ago - 1 year 1 month ago #5928 by ebr
Hi,

I used the following code to be able to use some external jar in my jython code.
import sys

# add the jar to your path
sys.path.append("C:\\Project\\support\\test.jar") 


# add the jar to the ClassLoader
from java.net import URL, URLClassLoader
from java.lang import ClassLoader
from java.io import File

m = URLClassLoader.getDeclaredMethod("addURL", [URL])
m.accessible = 1
m.invoke(ClassLoader.getSystemClassLoader(), [File("C:\\Project\\support\\test.jar").toURL()])


# usage
from foo import HelloWorld
h = HelloWorld()
print h.hello("test")

Hoping it helps,
EBR
The following user(s) said Thank You: herr_spock

Please Log in or Create an account to join the conversation.

1 year 1 week ago #5954 by herr_spock
Hello ebr,

thanks a lot for your analysis! It works like a charm.

This information should go into the manual, because in several scripting threads it is stated that it is not possible to load external jar files into the jython interpreter of Modelio.

E.g. in:
Using JAR in Jython
Java libraries in scripts

This would help in the transition from Python macros to modules, because parts of some solution could be migrated to Java in a stepwise manner.

Best regards,

Herr Spock

Please Log in or Create an account to join the conversation.

Moderators: tma
Time to create page: 0.039 seconds
^ Back to Top