Book a Demo

Author Topic: Publish as HTML - Is there a batch generat option?  (Read 7209 times)

Damião

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Publish as HTML - Is there a batch generat option?
« on: May 21, 2015, 02:51:20 am »
We have to publish (HTML) our model everyday.

I wonder if there is a way to program the generation of the html
every day (mon to fri) in a predefined time.
Like a batch mode.

If so, the parameters:
package,
title,
output to,
style,
header image
and the other options
must be set up before on this configuration.

Thanks,  ::)

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #1 on: May 21, 2015, 06:37:17 am »
There is no out of box batch generation option, however a function call is exposed via the api so a script or custom executable can be created to do this.

In my case I created a custom executable and run it at specific times set up through the windows scheduler.

Some things to be aware off are that an interactive session needs to be logged in for the scheduled job to work.  If you search for html publish etc., you should find quite a bit of information on this topic in the forum including if I remember correctly a script that will do this when scheduled.

Damião

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #2 on: May 21, 2015, 10:31:47 pm »
thanks dear Smendonc

I'll search for topics including 'html publish' trying to find a script that does it.

I'll comment here later (if i find)...rs

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile

Damião

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #4 on: May 23, 2015, 02:30:33 am »
Thanks Dermot.

Now i am learning how to use the GetProjectInterface().

I've never used before.

Damião

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #5 on: June 20, 2015, 05:11:19 am »
i'm trying this:
=========
sub main
       dim r
      set r = CreateObject("EA.Repository")
       r.OpenFile("Provider=MSDASQL.1;Persist Security Info=False;Data Source=EA;LazyLoad=1;")
       set projectInterface = r.GetProjectInterface()
      dim s
      s = projectInterface.GUIDtoXML ("{D474D985-0E5A-4f91-8E0C-AF5E8DEA305B}")
          call projectInterface.ExportPackageXMI(s, 1, 1, 3, 0, 0, "C:\exp.xml")
      r.CloseFile()
end sub
main
=========
The code above run smothly til ExportPackageXMI that throws an unexpected error.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #6 on: June 22, 2015, 04:27:04 pm »
I guess you should send a bug report with trace details to Sparx.

q.

Damião

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #7 on: June 26, 2015, 04:48:09 am »
Dear Smendonc, Dermot and Qwety.

The Vbscript runs ok
but EA shows the license key management screen.

Is there a way that i can make
the connection occur without
this screen to be shown.

Obs:
a. It happens also when i have an opened EA before the script run.
b. we have mysql database.

Thanks again,
=============================================
sub main
     dim r
     set r = CreateObject("EA.Repository")
     r.OpenFile("EA-XXXX --- DBType=0;Connect=Provider=MSDASQL.1;Persist Security Info=False;Data Source=EA-XXXX;LazyLoad=1;")
     set projectInterface = r.GetProjectInterface()
     dim s
     s = projectInterface.GUIDtoXML ("{D474D985-0E5A-4f91-8E0C-AF5E8DEA305B}")
     call projectInterface.ExportPackageXMI(s, 0, 1, 3, 0, 0, "G:\TESTE\EA\arquivo.xml")
     r.CloseFile()
end sub
main
=============================================

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #8 on: June 26, 2015, 05:28:45 am »
Please post only once. See the answer on the other thread.

q.

Damião

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #9 on: June 26, 2015, 05:33:48 am »
Sorry for the duplication.

I didn't know that the topic was going to jump to the first line.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Publish as HTML - Is there a batch generat opt
« Reply #10 on: June 26, 2015, 05:51:27 am »
Not a real problem. Now you know it  :)

q.