Book a Demo

Author Topic: structured specification - ScenarioExtension  (Read 5762 times)

geert

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
structured specification - ScenarioExtension
« on: May 29, 2010, 12:26:08 am »
Hey all,

i am trying following code (C#):

                foreach (Scenario scenario in Element.Scenarios)
                {
                    foreach(ScenarioStep step in scenario.Steps)
                    {
                        foreach(ScenarioExtension ext in step.Extensions)
                        {

I get following error at runtime (builds fine) on the ScenarioExtension class:

Unable to cast COM object of type 'System.__ComObject' to interface type 'EA.ScenarioExtension'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{49139560-A6C6-4713-ABD8-C4FCAD234A05}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

I execute it against the Interop.EA.dll version 2.10.238.1

Any one any ideas as to why I get this error? Can any one reproduce this?

Would be much appreciated!
Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: structured specification - ScenarioExtension
« Reply #1 on: May 29, 2010, 09:28:26 am »
Wow!  Last night (my time) I tried the new repository.TreeSelectedElements (after having transfered to the 856 Interop.dll) and I believe the code threw the same exception!

It was too late so I went to bed without further checking as to why.  But things were working before I used the new Interop.

See: WARNING: Interop.EA.dll version anomaly in 856 for why specifying the version as: 2.10.238.1 is rather pointless...

Looks like there may more wrong with Interop.dll than the version number...

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

geert

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: structured specification - ScenarioExtension
« Reply #2 on: May 31, 2010, 05:02:06 pm »
i'm building against build 855 if that helps.

Grtz,
Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: structured specification - ScenarioExtension
« Reply #3 on: May 31, 2010, 05:26:14 pm »
Geert,

I think you need to make sure that all copies of the Interop.EA.dll are actually the latest.
Since Sparx has forgotten to up the version number you could still be working with an older "version" of the file.
Visual Studio automatically puts a copy of the file in "obj" and "bin" directories.
I would manually copy the file in the sparx directory and overwrite all copies of it.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: structured specification - ScenarioExtension
« Reply #4 on: May 31, 2010, 06:05:02 pm »
Wow!  2 Geerts!  :)  That explains some things...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: structured specification - ScenarioExtension
« Reply #5 on: May 31, 2010, 06:08:34 pm »
Yep, apparently, and I bet, 99% chance he (or she) speaks dutch as well.

Geert

geert

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: structured specification - ScenarioExtension
« Reply #6 on: June 01, 2010, 04:41:11 pm »
Hey!

yes i speak dutch :)

my question then is, why do i get no errors when invoking the ScenarioStep? (I think this is a new object as of EA8, no?)

Grtz,
Geert

beginner

  • Guest
Re: structured specification - ScenarioExtension
« Reply #7 on: June 01, 2010, 04:59:08 pm »
Gave it a quick try with 856 and had no problem. Report a bug to Sparx' support.

b.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: structured specification - ScenarioExtension
« Reply #8 on: June 02, 2010, 09:00:51 am »
Definitely report a bug, although I have been able to successfully use ScenarioStep and ScenarioExtension in the past.

It sounds to me like Interop.EA.dll is fine, but for some reason it's attempting to communicate with an older version of the underlying COM library.