Error using systemcomp​oser.utils​.importMod​elClass Unrecognized table variable name 'Type'.

2 次查看(过去 30 天)
Hello Community,
While I am trying the code below I got this error message. "Error using systemcomposer.utils.importModelClass Unrecognized table variable name 'Type'."
I checked all the entries in excel file and there is no instance for 'Type'. Also I couldn't find where the 'Type' is defined. Do you have any suggestion on that?
The code:
importAdapter = ImportModelFromExcel('C:\root\dictionary.xlsx','Components','Ports','Connections','PortInterfaces','RequirementLinks');
importAdapter.readTableFromExcel();
[archModel,custIdUUIDTableContainer, importLog, errorLog] = systemcomposer.importModel('MO_Tryout_',importAdapter.Components,importAdapter.Ports,importAdapter.Connections,importAdapter.Interfaces,importAdapter.RequirementLinks);
assignin('base','errorLog',errorLog);
The error:
Error using systemcomposer.utils.importModelClass
Unrecognized table variable name 'Type'.
Error in systemcomposer.importModel
Error in Create_MO_model_R2020b (line 6)
[archModel,custIdUUIDTableContainer, importLog, errorLog] =
systemcomposer.importModel('MO_Tryout_',importAdapter.Components,importAdapter.Ports,importAdapter.Connections,importAdapter.Interfaces,importAda

回答(1 个)

Josh Kahn
Josh Kahn 2024-4-15,13:17
Are you still having an issue with this?
A nice trick for debugging these import issues is to first make a representative basic model in System Composer and then export it to a table:
Then, look at the format of the exported table and use that as a guide for creating/reworking your real table data that you are trying to import.
Hope this helps,
Josh

类别

Help CenterFile Exchange 中查找有关 System Composer 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by