Can someone please point me to any documented examples, or help me with the following?
I would like to populate a UML Package Tree using macros, and have found that there is an method in the Uml Object Model, namely metamodel.UmlElementFactory.createPackage that looks like a contender. How does one call it from within the macro? I think I'm grappling with Aris Scripts' namespace references.
Also is there a way to direct macro output to a log or java console?
Many thanks.
Hi Oren.
For logging to a file using Macro or Report scripts, you can use the setFile method of the Context class as shown below:
var configFileData = (new java.lang.String(sLogFileContent)).getBytes("UTF-8") Context.setFile("info.cfg", Constants.LOCATION_COMMON_FILES, configFileData)
You just have to be careful in naming your file because it repels special characters. You could also replace the location argument value with Constants.LOCATION_OUTPUT.
Hope this helps.