SimMechanics Link with Inventor error
古いコメントを表示
Hi
I'm trying to import inventor assembly to SimMechanics with smimport command. I keep getting this error: "Caught "std::exception" Exception message is: bad lexical cast: source type value could not be interpreted as target" I have tried different assemblies including robot.iam from SimMechanics Link. Inventor exports second generation .xml and .stl without errors. I'm using Inventor 2014, Matlab r2014a and SimMechanics link 4.4.
Edit: I succeed to import en example file from here: http://www.mathworks.se/products/simmechanics/download_smxmlschema.html so there is a problem with Inventor export? Also all my programs and windows are 64bit.
Also 1st generation export/import seems to work fine..
Edit2: Problem solved. I updated Inventor to 2015. I hope that this post will help someone in the future..
4 件のコメント
anders midtbø
2014 年 10 月 16 日
Hi,
I have the same problem. 1st generation import in Matlab works fine. I tried to import the second generation file that you have linked to, the example and it works fine. But to import files that I have exported myself don`t work. Im using Inventor Professional 2015 and Matlab 2014a. I`ve also tried With Solidworks 2014 Pro and I got the same problem.
>> smimport('myFile.xml') Caught "std::exception" Exception message is: bad lexical cast: source type value could not be interpreted as target
- Item one
- Item two
Josef Liebhart
2014 年 10 月 24 日
編集済み: Josef Liebhart
2014 年 10 月 24 日
Hi, i had the same problem as Kasper^^. So i tried the same as he did: Install Inventor 2015. After that, it was possible to use sec. generation of simmechanics link. Thanks for the advice. PS: i use windows 32bit
Christian Boländer
2015 年 5 月 12 日
Hey, i have nearly the same problem. I can export successfully my CAD assembly from Inventor 2015 in second generation. but when i want to import it in matlab 2014b with the command: smimport('Hexapod.xml') i get this error: Caught "std::exception" Exception message is: bad lexical cast: source type value could not be interpreted as target.
Can someone help me??
Annegret Niesche
2015 年 7 月 8 日
編集済み: Annegret Niesche
2015 年 7 月 10 日
Hi,
I have the same problem and didn't find any solution so far. I use Inventor Professional 2015 and I want to open my exported Second Generation model with Matlab 2015a. I get the same error message as written above:
Caught "std::exception" Exception message is: bad lexical cast: source type value could not be interpreted as target
First generation model import works fine, but second generation does not.
Did anyone find a solution?
Edit: It works now for me. It seems as if the problems were related to some subasseblies, which I used to build the main assembly. Especially subassemblies of imported parts (e.g. download parts), which I used more than one time in my assembly, made problems. I solved these problems by using dummy parts instead of these assemblies or by creating derived parts of these assemblies.
回答 (2 件)
Steve Miller
2018 年 3 月 6 日
0 投票
As noted in the comments above:
- Use the latest version of Inventor
- Check your subassemblies to see if they are unique instances or reused instances.
-Steve
Aldo Caraceto
2020 年 12 月 1 日
0 投票
Hi,
if you replace the commas with full stops (".") in the XML file, you should fix the problem.
For more information, please have a look at the following MATLAB Answer:
Aldo
カテゴリ
ヘルプ センター および File Exchange で Model Import についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!