The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

MyGeneration from command line?

Last post 08-19-2008, 12:26 PM by David.Parsons. 2 replies.
Sort Posts: Previous Next
  •  08-19-2008, 6:25 AM 10816

    MyGeneration from command line?

    I was just wondering...is there a way to use MyGeneration from the command line? I need a way to generate entities for specific tables from a script.

     Thanks,

    J.P.

  •  08-19-2008, 6:45 AM 10817 in reply to 10816

    Re: MyGeneration from command line?

    First, let me mention our recent blog post on ES2009 this will be very easy for you when released. However, there is a way with MyGeneration, it's called ZeusCmd.exe and is in your MyGeneration Folder.

    See this post on the MyGeneration Forums by Justin (scroll down). 

    Here are the command line arguments:


    |=======================================================================
    | ZeusCmd.exe: Switches, arguments, etc.
    |=======================================================================
    | General switches
    |-----------------------------------------------------------------------
    | -?, -h                               | show usage text
    | -s                                   | silent mode (no console output)
    | -r                    | make paths relative to exe
    | -l <logpath>                         | log process events and errors
    | -e <integer>                         | template execution timeout
    |-----------------------------------------------------------------------
    | Project switches
    |-----------------------------------------------------------------------
    | -p <projectpath>                     | generate a template
    | -m <modulename>                      | regenerate a specific module
    |-----------------------------------------------------------------------
    | Template switches
    |-----------------------------------------------------------------------
    | -i <xmldatapath>                     | xml input file
    | -t <templatepath>                    | template file path
    | -o <outputpath>                      | output path
    | -c <saveinputpath>                   | collect input and save to file
    |-----------------------------------------------------------------------
    | Intrinsic Object switches
    |-----------------------------------------------------------------------
    | -aio <dllpath> <classpath> <varname> | add an intrinsic object
    | -rio <varname>                       | remove an intrinsic object
    |-----------------------------------------------------------------------
    | MyMeta switches
    |-----------------------------------------------------------------------
    | -tc <providername> <connectstring>   | test a database connection
    |=======================================================================
    | EXAMPLE 1
    | Execute a template:
    |-----------------------------------------------------------------------
    | ZeusCmd -t c:\template.jgen
    |========================================================================
    | EXAMPLE 2
    | Execute a template, no console output, log to file:
    |-----------------------------------------------------------------------
    | ZeusCmd -s -t c:\template.jgen -l c:\zeuscmd.log
    |========================================================================
    | EXAMPLE 3
    | Execute template, save input to an xml file:
    |-----------------------------------------------------------------------
    | ZeusCmd -t c:\template.jgen -c c:\savedInput.zinp
    |========================================================================
    | EXAMPLE 4
    | Regenerate from the saved input in example 3 above:
    |-----------------------------------------------------------------------
    | ZeusCmd -i c:\savedInput.zinp
    |========================================================================
    | EXAMPLE 5
    | Add an intrinsic object to the Zeus Configuration file.
    |-----------------------------------------------------------------------
    | ZeusCmd -aio TheDLLOfmyDreams.dll Lib.MyGen.Plugin.Utilities myVar
    |========================================================================
    | EXAMPLE 6
    | Remove an intrinsic object to the Zeus Configuration file.
    |-----------------------------------------------------------------------
    | ZeusCmd -rio myVar
    |========================================================================
    | EXAMPLE 7
    | Test a MyMeta Connection
    |-----------------------------------------------------------------------
    | ZeusCmd -tc SQL "Provider=SQLOLEDB.1;User ID=sa;Data Source=localhost"
    |========================================================================


    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  08-19-2008, 12:26 PM 10828 in reply to 10816

    Re: MyGeneration from command line?

    ES2008 has some unique requirements as to the location of our settings files. You might also want to review this thread to avoid some errors. ES2008 requires that the settings files be located relative to the folder where your script is executed from.
    David Neal Parsons
    www.entityspaces.net
View as RSS news feed in XML