Page 1 of 1

Control PackageScope During Command Line Generation

PostPosted: Tue Oct 12, 2021 7:17 pm
by matutino_jacob@bah.com
Hello,

I would like to access a nested package via command line generation. I am specifying the scope via the -package option. I am not receiving the expected package. The generated document when generating within the app is different from its command line counterpart using the same template document. I suspect that there is another package with the same name but I am having a hard time tracking down the package.
I have a couple questions:
- How do I specify the exact package I want to input when using command line to generate?
- Are there any helper macros or properties I can use to help me locate this mystery element within the project?

Thank you for your time,
Jacob

For more info:
I am using the following template file to debug:
Code: Select all
#foreach($p in $packageScope)
- $p.name
  - $p.documentation
  - $p.elementType
  - $p.ownedBy
  - $elementURL
#end


I get this with <redacted info> when generating from within MagicDraw on desired package:
Code: Select all
- <Package Name here>
  - <Package Documentation here>
  - resourcestaxonomy
  -
  -


I get this from command line generation with the following properties file:
Ran from
Code: Select all
C:\Program Files\MagicDraw\plugins\com.nomagic.magicdraw.reportwizard

Property file:
Code: Select all
#----main argument ----#
project = <path\\to\\local_project>.mdzip
output =  <path\\to>\\debug_packageScope.txt
template = debug_package_scope
package = <Package Name>


Command line generated code:
Code: Select all
- <Package Name here>
  -
  - requirements
  -
  -

Re: Control PackageScope During Command Line Generation

PostPosted: Mon Oct 18, 2021 5:51 pm
by matutino_jacob@bah.com
Rather than use package name, we decided to go with elementID. ElementId is unique to each element so this lets us specify exactly which package to use when generating a document with report wizard.

Note for generating from command line with a project hosted on Teamwork cloud:
Use the elementID command line parameter and input the element server ID from its respective element specification.