Why do I get the error message "Undefined function or variable" when importing ARXML?
조회 수: 9 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2020년 9월 30일
답변: MathWorks Support Team
2020년 9월 30일
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');
채택된 답변
MathWorks Support Team
2020년 9월 30일
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');
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!