8.2.3. Error message: „ImportError: DLL load failed
On this page
8.2.3. Error message: "ImportError: DLL load failed"
In this article you will learn how to fix the error "ImportError: DLL load failed" in AutoCAD Plant 3D. This message often occurs when the file paths for scripts exceed the permitted character length of Windows.
Prerequisites
- You have administrator rights on your local computer so that you can move file paths or adjust directories.
- Plant 3D is closed to avoid conflicts when moving files.
Step-by-step guide
-
Identify the path that is too long:
Check whether your CustomScripts are located in deeply nested directories, for example in OneDrive:
c:\users\username\onedrive\dokumente - detail engineering plant 3d\autocad plant 3d 2024 content\cpak common\customscripts\... -
Move the directory structure:
Move the CustomScripts folder to a local directory with a short path structure, for example:
C:\P3DContent\CustomScriptsResult: The path length is reduced massively, which bypasses the Windows limitation (MAX_PATH).
- Adjust the content path in Plant 3D: Open the project settings or the content path settings in Plant 3D and point to the new, shortened directory.
-
Run the registration command again:
Enter PLANTREGISTERCUSTOMSCRIPTS again in the Plant 3D command line.
Result: The scripts should now load without an error message.
Important notes
- Avoid OneDrive: Avoid storing content folders in synchronized cloud directories, since these often produce extremely long default paths due to the Windows folder hierarchy.
- Flat hierarchy: Always use short and flat directory paths (e.g. directly under
C:\) for your Plant 3D content. - Uniform standard: Define a uniform local path for everyone involved in the project (e.g.
C:\P3DContent) to avoid compilation errors in the team.
Troubleshooting
- Error despite a short path: If the error persists, experts can enable the Windows setting for long paths (>260 characters) via group policy or the registry. However, this is only recommended if the IT infrastructure supports it; shortening the paths is the safer way.
Copyright © 2026 by IntegaDesign GmbH. All Rights Reserved.