Notifications
Clear all

[Closed] the file contains no valid object

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

1 Reply

try

updateXRef $

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