8.2.2. Error message: "Can't find module vormain"
On this page
Fixing the error message "Can't find module vormain"
In this article you will learn how to fix the error message "Can't find module vormain" in AutoCAD Plant 3D. This error typically occurs when the content folder was not migrated correctly during a version upgrade.
Prerequisites
- You are using AutoCAD Plant 3D from version 2022 onwards.
- You have tried to run the command
PLANTREGISTERCUSTOMSCRIPTS.
Step-by-step guide
-
Identify the current content path: Check which content folder is configured in your current Plant 3D version. The error occurs when an outdated content folder (e.g. from version 2021) is stored in a newer version (from 2022 onwards).
Expected result: You find that the path points to a folder of an older version.
- Restore the original content folder: Switch to the original content folder that was delivered with your installed Plant 3D version (e.g. for Plant 3D 2023 the Content 2023).
-
Migrate your custom pipe classes: Copy your own pipe classes (specs) and catalogs from the old folder into the corresponding structure of the new content folder.
Important: The standard structure and the system files of the new content folder must not be overwritten in the process.
-
Run the registration again: Enter the command PLANTREGISTERCUSTOMSCRIPTS again in the Plant 3D command line.
Expected result: The command runs 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. From version 2022 onwards, they are located in the installation path of Plant 3D. Copying the old folder 1:1 therefore leads to conflicts.
- Best practice: During an upgrade, never take over the old content folder completely. Always use the new standard folder as the basis.
- Backup: Always create a backup copy of your content directory before moving pipe classes.
Troubleshooting
- Error still present? Check whether old paths in the Windows environment variables or in the Plant 3D settings still point to the directory
/CPak Common/of the previous version. - Scripts missing: Make sure that your CustomScripts are located in the subfolder
/CPak Common/CustomScriptsof the new content directory.