Notifications
Clear all

[Closed] [MaxPlus] File open failed when evaluating MaxScript

Hi!

I’m working on a project manager script, with the intentions of using xrefs. I thought I’d do it in python, so I would get a better understanding of the MaxPlus API.
I have however found that working with MaxPlus and xrefs are not the best idea, as very few features are exposed in MaxPlus.

But, on to the question. I decided to add new xref records by evaluating it in maxscript. The “xrefs.addNewXRefObject” function in mxs needs a list of objects to xref, as well as the full path to the file. I found that “getMAXFileObjectNames <path>” can give me the list of objects, and indeed it can via maxscript. But, when I tried evaluating this in python, I got a File open failed dialog. Still works in mxs, and the file is not corrupted.

MaxPlus.Core.EvalMAXScript('nodes = getMAXFileObjectNames "C:\	est_scene.max"')

Does anyone know what could be the problem here?

EDIT:
After further testing with different files and different computers, I found that the problem only happened with some files. They did not seem corrupted, but somehow they couldn’t be read.