Skip to main content
You are here:

How to Resolve Invalid Class Error for eDrawings and PDM Preview

This technical guide provides steps to resolve the Application Exception: Invalid Class Error that can occur when launching eDrawings or when previewing files in the SOLIDWORKS PDM preview tab, since the PDM preview also uses eDrawings. 

 

The error is caused by the Windows Management Instrumentation becoming faulty with the machine. The error can appear as a simple error prompt or as a lengthy string of system variables. 

viewing invalid class error

There are a few different solutions that may resolve the behavior. The first solution mentioned below resolves the error most of the time. If not, there are three other ways to try and resolve the error. We do recommend working with your IT professional to perform the steps.   

Solution 1

The first solution is to fix the files in by using the Command Prompt Run as Administrator. 

  1. Windows Start > type CMD to search for Command Prompt. Click ‘Run as Administrator’ to launch Command prompt in admin mode. 
Viewing menu navigation for this step
  1. In the Command Prompt, copy and paste the text below to switch to the correct directory. 
    Cd C:\windows\system32\wbem 
viewing command prompt for step 2
  1. Now that you are in the wbem directory, copy and paste all the lines of text below as a group into the Command Prompt. 
        • The system may display a warning that you are about to paste text that contains multiple lines. Select ‘Paste Anyway’ to proceed. 
        • The system may also prompt several RegSvr32 pop-ups as items are completed. Select OK for each prompt. 
        • This process may take several minutes to complete. 

 

regsvr32 /s %systemroot%\system32\scecli.dll 

regsvr32 /s %systemroot%\system32\userenv.dll 

regsvr32 cimwin32.dll 

mofcomp cimwin32.mof 

mofcomp cimwin32.mfl 

mofcomp rsop.mof 

mofcomp rsop.mfl 

for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s 

for /f %s in (‘dir /b *.mof’) do mofcomp %s 

for /f %s in (‘dir /b *.mfl’) do mofcomp %s 

regsvr32 wmisvc.dll 

wmiprvse /regserver 

viewing regsvr32 alert box
  1. Once completed, test launching eDrawings to see if the behavior has been resolved. 

Solution 2

Verify the Windows Management Instrumentation (WMI) service is running. 

  1. Windows Start > type Services > open the Services Application app. 
  2. Verify the service for Windows Management Instrumentation is started. If it is stopped, right-click on the service and click Start or press the Start link. 
viewing services window for step 2
viewing services solution for step 3
  1. Test launching eDrawings to see if the behavior has been resolved. 

Solution 3

Verify the Windows management Instrumentation (WMI) service is running on the System Configuration utility. 

  1. Open File Explorer, copy and paste the following path into the address bar. 
    %SystemRoot%\System32\Wbem\Repository

  2. Delete or rename the $WinMgmt.CFG file in the folder, if it exists. Leave all other files and folders as-is. The recreation of this CFG file requires the other files. This is the Configuration/Control File used by the WMI service to track repository status and metadata.

  3. Windows Start > type MSCONFIG > open the System Configuration utility.

  4. On the Services tab, verify the Windows Management Instrumentation services is check marked and running. To help find the service, you may need to sort the services alphabetically by clicking the Service column header. 
viewing system configuration window
  1. Reboot the computer to rebuild the CFG file. 
  2. Test launching eDrawings to see if the behavior has been resolved. 

Solution 4

The last solution is resetting the Windows Management Instrumentation repository using the Command Prompt in admin mode. 

  1. Windows Start > type CMD to search for Command Prompt. Click ‘Run as Administrator’ to launch Command prompt in admin mode. 
Viewing menu navigation for this step
  1. In the Command Prompt, copy and paste the text below and then press Enter to stop the WMI. The system may prompt to warn this will stop other services. Take note of the other service names in case they need started manually in the Services app as shown in Solution 2. Accept the message to proceed stopping the service.
    net  stop  winmgmt 
viewing command prompt for solution 4 step 2
viewing command prompt for solution 4 step 3
  1. On the next line, copy and paste the text below into the Command Prompt and press Enter to reset the repository. 
    winmgmt   /resetrepository 
viewing command prompt for solution 4 step 4
  1. On the next line, copy and paste the text below into the Command Prompt and press Enter to start the WMI. Note, once the repository is rebuilt, the system may start the process automatically. 
    net start winmgmt 
viewing command prompt for solution 4 step 5
  1. Test launching eDrawings to see if the behavior has been resolved. 

Technical Support

Get help from our team by Calling us at 800-364-1652 x 2. You can also get assistance by clicking the Technical Support button or the Email Our Experts button below. 

Scroll to Top