Error reading VRML file: ***.wrl: Can't open file for reading.

15 次查看(过去 30 天)
Hi I have an issue when i try to open a .wrl file.
Here's my code :
world=vrworld('my_satellite', 'new');
open(world);
Here's the error message
Error reading VRML file: ***.wrl: Can't open file for reading.
  4 个评论
Peter Basár
Peter Basár 2021-3-28
For me, the issue was that I wasn't in the model directory with my workspace. So first launch matlab and then have it open in the directory where your model is located or from where the code was made.
I've been using just the simulink model so the matlab wasn't inclined to tell me that I'm not in the directory of that model where there are possible external files needed to be loaded and linked with simulink. These external files were addressed with relative paths and so the matlab couldn't find them in the workspace default folder.

请先登录,再进行评论。

回答(1 个)

Nathan Hardenberg
Nathan Hardenberg 2021-4-23
For me the problem was the path. One folder contained a #-symbol which caused the error. Even if the path is relative a # in the absolut path can cause the error. So with the comments in mind a list to fix the error:
  1. Check if the workspace directory is the desired one
  2. Try using the absolute path to the file
  3. Check the abolute path for any uncommon sybols (Spaces and Underlines work; # does not work)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by