Way to generate code from command line

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
Maarten_BE
Sr. Member
Sr. Member
Posts: 18
Joined: 25 Feb 2015, 15:58

Way to generate code from command line

Post by Maarten_BE »

Is it possible to generate the code of a model from CLI without starting the GUI and clicking on the blue wheel?

I am looking into setting up an automated build environment and I would like to include the code generation as part of the automated build on a headless server.

User avatar
Support Team
Hero Member
Hero Member
Posts: 2639
Joined: 18 Mar 2011, 15:09

Re: Way to generate code from command line

Post by Support Team »

Hi,

Yes, this feature is available but not officially supported and documented. We use it only internally at the moment for automated tests of UaModeler and the code generation.


You can start the UaModeler from command line with:
uamodeler -g <ProjectName>.tt2pro

This starts the UaModeler, loads the project <ProjectName> generates code and closes the UaModeler.


Best Regards,
Unified Automation Support Team

felix.kretschmer
Full Member
Full Member
Posts: 9
Joined: 11 Sep 2015, 15:26

Re: Way to generate code from command line

Post by felix.kretschmer »

Hi,
does this also works for xml nodeset exports?
Is there a command line switch for that?

Thanks.

chuber50
Jr. Member
Jr. Member
Posts: 2
Joined: 21 Nov 2018, 15:21

Re: Way to generate code from command line

Post by chuber50 »

felix.kretschmer wrote:Hi,
does this also works for xml nodeset exports?
Is there a command line switch for that?

Thanks.
We would as well need such a function. +1

Thanks

portelajoao
Jr. Member
Jr. Member
Posts: 2
Joined: 28 Apr 2020, 12:38

Re: Way to generate code from command line

Post by portelajoao »

chuber50 wrote:
26 Nov 2018, 11:47

We would as well need such a function. +1

Thanks
This would be really usefull in order to create our pipeline. Is there any command that allows to:
  • publish model
  • export XML
  • export CSV

User avatar
Support Team
Hero Member
Hero Member
Posts: 2639
Joined: 18 Mar 2011, 15:09

Re: Way to generate code from command line

Post by Support Team »

Hello,

The comandline processing is just a internal feature that is used for the testing of the code generation.

Since the main use case of UaModeler is to create information models there are no plans for supporting a command line processing for the export and publishing features, which would only be useful for existing model.
Best regards
Unified Automation Support Team

Post Reply