Clear Filters
Clear Filters

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

2 views (last 30 days)
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

Answers (1)

Josh Kahn
Josh Kahn on 15 Apr 2024
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

Categories

Find more on System Composer in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!