[Closed] maxscript holding previous script in memory?
This one is a little weird. I am running a script that I have to run twice initially to make it work. When I make changes to it, I have to run it twice to see those changes. It’s like it’s holding the previous script in memory or something. Has anyone seen this before?
it’s like something wrong in your script, but without seeing the script it’s hard to say what exactly.
the most likely reason is that some function uses variables defined after the function declaration. so the function uses the previously defined data.
that was it, thank you Denis! I am using Paul Neale’s XML reader code @ http://paulneale.com/tutorials/dotNet/xml/xmlReading.htm . I have to set the dotNetObject to undefined. Then it works.
dotNet.loadAssembly "system.xml"
xmlDoc = dotNetObject "system.xml.xmlDocument"
docEle=xmlDoc.documentElement
...code...
docEle=undefined
xmlDoc=undefined
not a first time i see this line in different scripts… you don’t have to load this assembly. it loads automatically with max system.