필터 지우기
필터 지우기

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 CenterFile Exchange에서 Simscape Multibody에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by