PDA

View Full Version : the file contains no valid object


lellis2k
04-27-2009, 12:23 PM
Hey guys,

Im having strange problems with my script.

Im trying to change the xref object by using the following code:
$.objectName="myobject1"
$.currentFileName="c:\myfiles\myobject1.max"

Now if I copy and paste the contents into the 2 fields it works perfectly, but if I use the above code, text displays in the fields exactly the same as the manual way, but it doesn't work.

The status of the xref is: "unresolved, object not found" and if i click the "..." button under object name to browse for it i get an alert: "the file contains no valid object"

I have no idea why changing it using maxscript and pasting it in should be any different.

Any Ideas?

Thanks, Leigh

Kramsurfer
04-28-2009, 11:46 PM
try

updateXRef $

After your changes... should force a reload of the new xrefObject info...

CGTalk Moderation
04-28-2009, 11:46 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.