フィルターのクリア

Setting path for CAD parts in Simscape Multibody

16 ビュー (過去 30 日間)
Gianpietro Battocletti
Gianpietro Battocletti 2023 年 6 月 7 日
回答済み: Dhruv 2023 年 8 月 31 日
I am creating a Simscape project to simulate a 3D model I created with Autodesk Inventor 2021 (Build 250183000, 183). I succesfully exported the .xml and .STEP files using the Simscape Multibody Link plugin (Version 7.4). I am also able to create the Simulink model using the command:
smimport('filename.xml')
To keep my folders more clean I would like to have the model files in a separate folder and have the File Solid blocks in the Simulink file point to it. After creating a model_data folder in which I put all the .STEP files and the .xml file, I run:
smimport('model_data\filename.xml')
The Simulink model is created again succesfully. However, this time it does not work as expected. In fact, all the File Solid blocks have their Geometry\File Name field pointing directly to the .STEP file instead of containing the relative path to it (i.e., the File Name field is still 'file.STEP' instead of 'model_data\file.STEP'). Therefore, the .STEP files are not found correctly and the simulation cannot start. How can I fix this?

回答 (1 件)

Dhruv
Dhruv 2023 年 8 月 31 日
It seems like you are facing an issue with the relative paths not being set correctly for the File Solid blocks in your Simulink model after you've moved the model files to a separate folder.
This can happen because the paths might not be updated automatically when you import the model using "smimport()".
To fix this issue, you can manually update the File Solid block paths to use relative paths pointing to the "model_data" folder.
Please see the following link for more information on the steps involved:
I hope this helps solving your issue!

カテゴリ

Help Center および File ExchangeSimscape Multibody についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by