Book a Demo

Author Topic: Command Line interface to the EA HTML Generator  (Read 6537 times)

SwissSteve

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Command Line interface to the EA HTML Generator
« on: May 07, 2008, 03:45:21 pm »
Is it possible to drive the HTML generator from the command line?
I would like to output the model in HTML format overnight with the goal of being able to link to key documents in a wiki?

Any thoughts would be appreciated.

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Command Line interface to the EA HTML Generato
« Reply #1 on: May 07, 2008, 04:03:16 pm »
Quote
Is it possible to drive the HTML generator from the command line?
I would like to output the model in HTML format overnight with the goal of being able to link to key documents in a wiki?

Any thoughts would be appreciated.

That is what the Addin API is for.
You can write an external program which can be started to script all sorts of operations.
More information can be gathered from the program help and the sparx systems resources web site.

Oliver

SwissSteve

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #2 on: May 07, 2008, 04:57:11 pm »
 OK I will read the AddIn API doc.
I was hoping EA would have something already to provide this.
I guess I am not the first person to want to do this so hopefully a simple solution will get posted.

SwissSteve

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #3 on: May 07, 2008, 07:32:39 pm »
I have read the AddIn API and got the test C# Addin example running ok but it is still not clear to me how to trigger the HTML generator from within my Addin code.

anyone any ideas?

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #4 on: May 07, 2008, 08:41:15 pm »
In the EA_MenuClick method you have a parameter Repository. This has a GetProjectInterface method returning an object which has a RunHTMLReport method.

For a command line tool instead of an AddIn you would have to create an EA.Repository object and call it's OpenFile method.

SwissSteve

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #5 on: May 07, 2008, 09:14:40 pm »
thanks frank

SwissSteve

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #6 on: May 07, 2008, 11:08:39 pm »
the following code works fine for accessing the EA model.  It seems to bring the whole model out which is what I want.   My question is how to open a repository when storing EA in a DB?

Code: [Select]
              repository = new EA.Repository();
                repository.OpenFile("<eap location>");
                project = repository.GetProjectInterface();
                project.RunHTMLReport("", "c:\\test", "PNG", "default", "htm");


Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #7 on: May 07, 2008, 11:12:50 pm »
It's in the online help for the OpenFile method:

Quote
You can also connect to a SQL database by passing in the connection string itself instead of a filename. A valid connection string can be obtained from the Open Project dialog by selecting a recently opened SQL repository.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #8 on: May 08, 2008, 12:13:13 am »
Or through the Repository.ConnectionString property.

[This seems to have crept into the API documentation after the portion Frank cites.]
No, you can't have it!

SwissSteve

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #9 on: May 08, 2008, 03:59:58 am »
My searching did not reveal a link to the on line help you are referring to. Can you post a link if possible

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #10 on: May 08, 2008, 09:40:09 am »
Both items are in the Repository topic:

http://www.sparxsystems.com.au/EAUserGuide/index.html?repository3.htm

ConnectString is in the first (Attributes) table and OpenFile is in the second (Methods) table.
Best Regards, Roy

SwissSteve

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Command Line interface to the EA HTML Generato
« Reply #11 on: May 08, 2008, 03:05:29 pm »
Got it.  thanks for the help