Setting path for CAD parts in Simscape Multibody

14 visualizzazioni (ultimi 30 giorni)
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?

Risposte (1)

Dhruv
Dhruv il 31 Ago 2023
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!

Categorie

Scopri di più su Simscape Multibody in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by