MATLAB Answers

what's a externally defined MCOS class ?

98 views (last 30 days)
loubna ibnou fairouze
loubna ibnou fairouze on 6 Dec 2019
Edited: Gokul on 25 May 2020 at 13:21
Hello all,
I am getting this error while runing a test on testManager 'You must remove the externally defined MCOS class before you can use the dictionary definition'. I don't know what are MCOS class, and how do I remove one ?
Best regards.
Loubna.

  0 Comments

Sign in to comment.

Answers (5)

Jin-seok Jeong
Jin-seok Jeong on 29 Feb 2020
Edited: Jin-seok Jeong on 29 Feb 2020
I have the same problem.
In my case, the error was due to the enumerated type defined in data dictionary.
But there was no problem in 2018b.
I have no idea why the mcos class error occurs in 2019b.

  1 Comment

Sean de Wolski
Sean de Wolski on 2 Mar 2020
Please contact tech support. This is a public forum.

Sign in to comment.


Brian Kim
Brian Kim on 27 Mar 2020
The root cause of this message is most likely that the enumeration is first defined programmatically (e.g. 'Simulink.defineIntEnumType') and Simulink then attempts to redefine it when loading a model linked to a data dictionary which contains a second enumeration definition.
In order to prevent these issues, you may wish to employ the following commands:
>> Simulink.clearIntEnumType
This will clear enum definitions created by the "Simulink.defineIntEnumType" command.
>> Simulink.data.dictionary.closeAll
This will close connections to data dictionaries that are presently open. If a data dictionary contains an enum definition, closing the dictionary will attempt to release this enum definition from memory.
For additional information related to these functions please reference the following documentation pages:

  1 Comment

Gokul
Gokul on 25 May 2020 at 13:20
Hello,
I tried the function "Simulink.clearIntEnumType" on R2019b, to get rid of this MCOS error. But it seems to be unable to remove and gives the following Warning:
>> Simulink.clearIntEnumType
Warning: Cannot clear class 'AStype' because instances of the class still exist.
Could you suggest how can I clear this, without closing and restarting Matlab?
Note: The data dictionary/models are all already closed

Sign in to comment.


Samir Revelo
Samir Revelo on 20 Jan 2020
Hello,
I´m getting the same error after upgrading my Simulink project from matlab version r2018b to r2019b.
Would be very helpful if Matlab support can give any hint about the issue.

  0 Comments

Sign in to comment.


Sean de Wolski
Sean de Wolski on 10 Feb 2020
I'd contact tech support on that one.

  0 Comments

Sign in to comment.


Oleksandr Pylypenko
Oleksandr Pylypenko on 23 Mar 2020
I get this error when moved all model data(with enum) to data dictionary, but in the matlab memory that define was saved. In the end I had two definition of enum. In order to delete enum from matlab memory run this command: Simulink.clearIntEnumType()

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by