Book a Demo

Author Topic: Unknown/Illegal Base Type" warning  (Read 6928 times)

Tafros

  • EA User
  • **
  • Posts: 25
  • Karma: +1/-0
    • View Profile
Unknown/Illegal Base Type" warning
« on: January 07, 2019, 10:37:32 pm »
Hi
Am creating a custom tab through add-in using EA_OnContextItemChanged event and it works good as expected .
But  when i try to add a new diagram object from tool box EA throws a warning as "Unknown/Illegal Base Type" . Is this a known issue?
Below is the code snippet used in  EA_OnContextItemChanged  method.

  public void EA_OnContextItemChanged(EA.Repository Repository, string GUID, EA.ObjectType ot)
        {
            try
            {
                EA.Element ele = Repository.GetElementByGuid(GUID);
                if (ele != null)
                {
                    UserControl1 UC = Repository.AddTab("Try", "Test.UserControl1") as UserControl1;
                }
            }
            catch (Exception ex)
            {
            }
        }

Thanks
« Last Edit: January 07, 2019, 10:57:04 pm by Tafros »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Unknown/Illegal Base Type" warning
« Reply #1 on: January 07, 2019, 11:42:05 pm »
When exactly are you getting an error?
Are you sure the error is related to the code you mentioned?

Geert

Tafros

  • EA User
  • **
  • Posts: 25
  • Karma: +1/-0
    • View Profile
Re: Unknown/Illegal Base Type" warning
« Reply #2 on: January 08, 2019, 12:36:25 am »
Hi Geert
Thanks for your response.
Actually my aim was to creating a custom tab on each object selection based on some conditions.
when i selecting an object from project browser or creating object using quick options from project browser,it working good as expected.

But When i trying to create an object on diagram workspace using toolbox/rightclick diagram workspace option, "EA_OnContextItemChanged" triggered,new tab will get created and at the end of this method it throws an Unknown/illegal base type 'Class'(Any UML Type) warning.

Thanks

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Unknown/Illegal Base Type" warning
« Reply #3 on: January 08, 2019, 01:29:03 am »
That's weird. I would expect such an error if you would have a bad MDG defining stereotypes that extend non-existing metaclasses.
Does it happen with any toolbox item?

Geert

Tafros

  • EA User
  • **
  • Posts: 25
  • Karma: +1/-0
    • View Profile
Re: Unknown/Illegal Base Type" warning
« Reply #4 on: January 08, 2019, 04:03:21 pm »
This is happening only for UML types(Class,Use Case,Component,Device,Requirement,etc,.) toolboxes (Class,Use Case,Object,Component,Interaction,etc,.) but this is working good for MDG's like BPMN,Archimate and any custom MDG defined Stereotypes.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Unknown/Illegal Base Type" warning
« Reply #5 on: January 08, 2019, 06:14:56 pm »
I would report a bug to Sparx and see what they have to say.

Geert

TonyC

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Unknown/Illegal Base Type" warning
« Reply #6 on: February 01, 2022, 03:25:13 am »
Hi Tafros, I have the same error to the one that you have reported. I cannot add Classes to Class diagrams anymore, even as administrator. I can however add elements to state machines for example. My MDG technology extends the Class metaclass and the Table metaclass. I've removed my MDG technology temporarily but the issue still prevails. It is like the Class class has got corrupted in some way by my MDG technology. Did you get a response from Sparx on this?

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Unknown/Illegal Base Type" warning
« Reply #7 on: February 17, 2022, 01:39:54 am »
Hi,

any news?

I get a similare error. But after EA_OnPreNewElement().

Best regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

TonyC

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Unknown/Illegal Base Type" warning
« Reply #8 on: February 17, 2022, 02:00:15 am »
I solved it, but in a slightly strange way.

I logged on as Administrator. Disabled security (which took 20 mins!) then re-enabled it, making sure both processes completely successfully. I think that I lost connection to my server repository part way through the process of locking a large number of elements, which caused the corruption, so had to ensure I went completely round the loop again to remove the inconsistency. I can now create classes again! :)