Battery Builder cannot write library files — “no write access” when saving to OneDrive folder

15 Ansichten (letzte 30 Tage)
Ye
Ye am 16 Okt. 2025 um 8:58
Kommentiert: Xiangchun am 20 Okt. 2025 um 14:27
Hi.
I’m trying to create a custom battery library using the Battery Builder app (Simscape Battery).
When I click Create Library, I get the following error:
“There is no write access within path:
C:\Users\yelin_mem\OneDrive - myCompanyName\Documents\MATLAB\Models\FMU model
I believe this might be related to the folder being inside OneDrive, but I’ve already given every possible write permission in Windows.
Here’s what I’ve tried so far:
  • Verified that my Windows user has Full control of the folder (via folder → Properties → Security).
  • Tried running MATLAB as Administrator.
  • Confirmed that it has no problem when I switch to a local path.
  • Paused OneDrive sync (to avoid file locking).
  • Set the folder and subfolders to “Always keep on this device.”
  • The error still occurs only when Battery Builder tries to generate files.
When I change the output folder to a local path outside OneDrive (for example C:\BatteryTest), the library builds successfully — so this appears to be a OneDrive-specific issue.
I’d appreciate any help diagnosing this.
Is there a recommended way to work with Battery Builder projects stored in OneDrive, or should I always build locally and then copy the results manually?

Antworten (1)

Xiangchun
Xiangchun am 16 Okt. 2025 um 15:40
Hi @Ye,
In this case, I would recommend that you build the battery library on a local drive first and then copy them to a OneDrive folder.
Best wishes,
Xiangchun
  2 Kommentare
Ye
Ye am 17 Okt. 2025 um 8:03
Bearbeitet: Ye am 20 Okt. 2025 um 7:13
Hi,
Thank you for the answer. I have quite some build to run, and it's not really convenient to build it locally and then paste it in, is there a way allowing me the work under Onedrive folders?
Best regards,
Ye Lin
Xiangchun
Xiangchun am 20 Okt. 2025 um 14:27
Hi @Ye,
As a temporary workaround, can you please try running the following in the Command Window before building the battery library?
fileattrib(pwd,'+w');
This assumes that you want to build the battery library in the current folder, which is a OneDrive path.
Again, I would still highly recommend building the library in a local drive first then copy it over to OneDrive.
Best wishes,
Xiangchun

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Energy Storage finden Sie in Help Center und File Exchange

Produkte


Version

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by