Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
arhymingape opened this issue Mar 4, 2022 · 5 comments

Comments

@arhymingape
Copy link

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.
@JeffHanna
Copy link
Collaborator

JeffHanna commented Mar 4, 2022

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.

@arhymingape
Copy link
Author

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.

@BigBrotherLi
Copy link

same issue!

@OkeniteOwner
Copy link

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

@zhoulong
Copy link

zhoulong commented Mar 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants