Unable to perform the harness operation for the externally saved test harness since the directory is not writable

18 ビュー (過去 30 日間)
When trying to externally creating a test haness, simulink is returning this error:
Error:Unable to perform the harness operation for the externally saved test harness 'untitled_Harness1' since the directory is not writable.
[1] This issue happens with any matlab version.
[2] Running Matlab as admin does not solve the issue.
[3] Even after the file beeen synchronized with OneDrive, the issue persists.
[4] I have windows R/W permissions to the folder

採用された回答

Madheswaran
Madheswaran 2025 年 1 月 10 日
Hi Flavio,
I have came across similar error once. I checked the permissions with 'fileattrib' command, and noticed that value for 'UserWrite' was 0 eventhough I had Windows read & write access to the directory. I flipped the 'UserWrite' value to 1, later it worked fine for me.
You can modify the permissions using the below command:
fileattrib(<your directory address>, '+w');
For more information, refer to the following documentation: https://mathworks.com/help/matlab/ref/fileattrib.html
I hope this would solve the issue you are facing!
  1 件のコメント
Flavio Luiz Puhl Jr
Flavio Luiz Puhl Jr 2025 年 1 月 10 日
Hi Madheswaran,
Thanks a lot for your answer. Now it is working and I can externally create the test harness.
PS: in order to fileattrib work, the path shall not have spaces (maybe other characteres are also not allowed, but I didn't test)
Thanks again.
Before
After

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by