8.2.2. Error message: "Can't find module vormain"
Fixing the error message "Can't find module vormain"
In this article, you will learn how to resolve the "Can't find module vormain" error message in AutoCAD Plant 3D. This error typically occurs when the content folder was not correctly migrated during a version upgrade.
Prerequisites
- You are using AutoCAD Plant 3D version 2022 or newer.
- You have attempted to execute the command
PLANTREGISTERCUSTOMSCRIPTS.
Step-by-Step Instructions
-
Identify the current content path: Check which content folder is configured in your current Plant 3D version. The error occurs if an outdated content folder (e.g., from version 2021) is specified in a newer version (2022 or higher).
Expected result: You determine that the path points to a folder from an older version.
- Restore the original content folder: Switch to the original content folder that came with your installed Plant 3D version (e.g., for Plant 3D 2023, the Content 2023 folder).
-
Migrate your custom specs: Copy your own specs and catalogs from the old folder into the corresponding structure of the new content folder.
Important: The default structure and system files of the new content folder must not be overwritten during this process.
-
Perform the registration again: Re-enter the command PLANTREGISTERCUSTOMSCRIPTS in the Plant 3D command line.
Expected result: The command executes successfully without the error message Can't find module 'vormain'.
Important Notes
- Background: Up to version 2021, the standard scripts were located directly in the content folder. Since version 2022, these are located in the Plant 3D installation path. Therefore, a 1:1 copy of the old folder leads to conflicts.
- Best Practice: When upgrading, never adopt the old content folder in its entirety. Always use the new default folder as a basis.
- Backup: Always create a backup copy of your content directory before moving specs.
Troubleshooting
- Error still persists? Check if old paths to the
/CPak Common/directory of the previous version are still present in the Windows environment variables or in the Plant 3D settings. - Scripts missing: Ensure that your CustomScripts are located in the
/CPak Common/CustomScriptssubfolder of the new content directory.