techartorg / MXSPyCOM

A modern version of MXSCOM, to allow for editing & execution of 3ds Max MaxScript and Python files from external code editors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System.ArgumentNullException: Value cannot be null. (Parameter 'type')

arhymingape opened this issue · comments

Hi, I am getting the following error when running the task on the provided hello world maxscript file.
Am using VSCode 1.64.2, 3DS Max 2020.

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'type')
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath)
   at MXSPyCOM.Program.Main(String[] args)
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command & 'C:\Program Files\MXSPyCOM\MXSPyCOM.exe' -s c:\[PATH_TO_MAXSCRIPT]" terminated with exit code: 1.

c:\[PATH_TO_MAXSCRIPT]

MXSPyCOM is being provided that as the path to the script file you are trying to run. That's not a valid path to a file.

Hey Jeff,
Sorry, should have mentioned I just replaced that part manually before pasting in here as it was a long path.

I tried hard coding the path in the json file and also tried it with the workspace in the User directory.

Still get the error. Saw some closed issues with similar error but wasn't able to get much of a clue from it. Any thoughts?

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'type') at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath) at MXSPyCOM.Program.Main(String[] args) The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command & 'C:\Program Files\MXSPyCOM\MXSPyCOM.exe' -s c:\Users\arhymingape\maxscript\hello_world.ms" terminated with exit code: 1.

same issue!

Hello,
i get the same issue with VSCode :
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'type')
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath)
at MXSPyCOM.Program.Main(String[] args)

  • The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command G:/Wip/Projets/_VSCode_MR_Portable/Data/MXSPyCOM/MXSPyCOM.exe -s 'C:\Users\Administrateur\AppData\Local\Autodesk\3dsMax\2021 - 64bit\ENU\usermacros\test.ms'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

Did someone found a solution ?
Thanks by advance

Put initialize_COM_server.ms into [install path]/scripts/Startup folder. Then restart 3dsmax.