Importhdl error: unable to create the slx file, because the specified folder is read-only

2 views (last 30 days)
Hello,
I am using Matlab R2022b on Windows 11 and I am having an issue with the `importhdl` command.
When I try to load hdl with `importhdl` I get the following error:
Unable to create the slx file, because the specified folder '...' is read-only.
This is very weird because I can manually create and save an slx file in the same folder without any issue.
When investigating on the rights of my user for the folder in question, I can see that I have them all (read/write/etc.).
I can only see that there is a `-` sign in the checkbox next to the `Read-only` attribute (i.e. only applies to files in folder). I tried to remove the sign, but it keeps coming back. It seems that I cannot remove it permanently.
Also, launching Matlab as Administrator does not help. The same issue produces.
Do you have an idea of the issue and how to fix it? Why can I create and delete files/subfolders from Matlab in a certain folder with mkdir and other commands, but the importhdl command cannot create a file in the same folder?
Thanks in avdance for your help!
  1 Comment
Enrica
Enrica on 13 Feb 2023
Some more debugging:
  • the example importhdl('comparator.v'); runs properly and creates a Simulink file, even when run form the folder above, which means that the folder is NOT read-only
  • the error is thrown by importhdl (line 78). The code at that line is privimporthdl(hdlInSrc, varargin{:}), which cannot be debugged
I suspect that the true error is not a read-only issue but that the .v files I am trying to import are incompatible/corrupted.

Sign in to comment.

Answers (1)

Raghav
Raghav on 4 Apr 2023
Edited: Raghav on 4 Apr 2023
Hi,
Based on your question, I can understand that you are facing issue with ‘privimporthdl(hdlInSrc, varargin{:})’ line.
Please refer to the below mentioned link to know about the list of supported constructs with importhdl:
If you encounter the same error, please contact MathWorks Technical Support with your source code so we can investigate.
Thanks,
Raghav Bansal

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!