[Closed] getNodeByName, System Exception
Greetings
I’m getting some wierdness with getting Nodes by Name, and am having troube pinning down the cause.
I basically have some dynamically created objects which I freeze, and hide or unhide depending on various calculations. When these objects are no longer needed, they are deleted.
What I am running into is something is messing up those nodes internally, and I’m not sure what.
My Script would fail on
sph1 = getnodeByName (nodestring + “_a1”)
I started to troubleshoot this in the listener and got the following
getnodeByName (“9_6” + “_a1”)
** system exception **
$9_6_a1
** system exception **
I Then selected the object using the select by name toolbar tool. and in the listener typed:
$
$GeoSphere:9_6_a1 @ [-3552.035645,-2436.765137,7019.664063]
If I save and restart max, I can select this object normally again…
Anyone else ever run into something similar?
(running 3ds max 2012 64 bit)
Cheers
Mikie
What if you wrap it in single quotes? Your name violates the valid naming conventions for maxscript. Refer to the maxscript help on names here.
Names set in single quotes allow you to write names that contain illegal identifier characters, such as spaces and other punctuation. They are primarily intended for specifying 3ds Max object classes and properties that have special characters in their names.
-Eric
Of couse!!! Will add a leading character and see if that clears it up…
Indeed that seems to have sorted it out… I would have expected to see an error much earlier on with an invalid object name, so didn’t even think twice about it…
by the way, apparently tried to give you props, but
“You must spread some Reputation around before giving it to PiXeL_MoNKeY again.”
thanks
No problem, I am here to do what I can to help others, not to get reputation. Though thank you for trying.
-Eric