Why do I get the error message "Undefined function or variable" when importing ARXML?

9 visualizzazioni (ultimi 30 giorni)
For releases from R2016a to R2018a, when using "createComponentAsModel" with the "DataDictionary" option, I get the following error:
Undefined function or variable
I am using the following code to import the ARXML:
importerObj = arxml.importer('myARXMLfile.arxml');
createComponentAsModel(importerObj, '/ComponentTypes/myComponent', 'CreateInternalBehavior', true, 'DataDictionary', 'myDictionary.sldd');

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 30 Set 2020
The error that you are seeing is due to a bug, which originated in R2016a. This issue makes bus-type parameter values not imported correctly when using SLDD.
The bug has been fixed in R2018b, so upgrading your release would fix the issue.
As a workaround if upgrading is not possible, you can do "createComponentAsModel" without saving the data to the Data Dictionary, and then perform the operation again, this time using the "DataDictionary" property:
importerObj = arxml.importer('myARXMLfile.arxml');
createComponentAsModel(importerObj, '/ComponentTypes/myComponent', 'CreateInternalBehavior', true);
bdclose
createComponentAsModel(importerObj, '/ComponentTypes/myComponent', 'CreateInternalBehavior', true, 'DataDictionary', 'myDictionary.sldd');

Più risposte (0)

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by