I'm trying to get a Max scene to attach xrefs that are listed in a text file (so that file can change externally and the maxscript can be run to update everything)
This is my code, it seems to read the text file but throws up and error and doesn't attach anything:
This is the error in the listener:
Any ideas on what's wrong?
Thanks.
This is my code, it seems to read the text file but throws up and error and doesn't attach anything:
Code:
xrefPath = "c:\\users\\jaime\\desktop\\x\\" ext = ".max" listArray = #() file = openFile "c:\\users\\jaime\\desktop\\x\\xrefs.txt" mode:"r" while not eof file do ( lineInfo = readLine file append listArray lineInfo ) close file for i in listArray do ( xrefs.addNewXrefFile (xrefPath + i + ext) i )
Code:
"c:\users\jaime\desktop\x\" ".max" #() <File:c:\users\jaime\desktop\x\xrefs.txt> #("temp.max", "vbnv.max", "scriptest.max") OK -- Error occurred in i loop; filename: ; position: 314; line: 15 -- Frame: -- i: "temp.max" -- Runtime error: Unknown addNewXRefFile argument: "temp.max"
Thanks.
Comment