Error in smimport(' ') command: Illegal use of reserved keyword "end" AND Attempt to execute SCRIPT smimport as a function

1 回表示 (過去 30 日間)
Hello. I tried to import a CAD model from solidworks (xml file format) to simsape multibody, using the smimport command. The command does not seem to work as i get the following error:
Error: File: smimport.m Line: 170 Column: 1
Illegal use of reserved keyword "end".
When i click on the error the following file appears:
Does anyone knows what is this error?
I then tried to run the matlab as administrator and delete the 'end' from line 170. Then i got a different error:
>> smimport('sm_Assem.xml')
Attempt to execute SCRIPT smimport as a function:
C:\Program Files\MATLAB\R2018b\toolbox\physmod\sm\import\m\smimport.m
I have no idea what is this script file and i am afraid i will mess it up if i try to modify it.
Any help would be really appreciated.
Thank you
  6 件のコメント
madhan ravi
madhan ravi 2020 年 7 月 11 日
Try maybe reinstalling that toolbox?
Eleni.T
Eleni.T 2020 年 7 月 11 日
編集済み: Eleni.T 2020 年 7 月 11 日
I reinstalled it, but still i get this error when i use smimport(' ')
I replaced the first line with the one you said :
function varargout = smimport(multibodyDescription, varargin)
and replaced every multibodyDescriptionFile with multibodyDescription and it worked!
Thank you!

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2020 年 7 月 11 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModel Import についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by