View Full Version : Repathing Xref Objects
07-05-2011, 01:12 AM
Has anyone had any success with repathing Xref Objects?
I have file A that has geometry in it.
I have file B with a rig in it.
I'm Xref-object-ing the geometry from file A into file B and linking those objects to the rig. (It's a robot, so no actual skinning needed)
I need to move file A to a different folder and repath the objects that are referenced into file B
I used .currentFileName to repath all of the objects to the new position of the file. The UI updates reflecting these changes correctly.
After I save and reload file B, it fails to find the objects in file A.
I try to manually pick each object via the xrefObject UI, but none of the relevant objects that are in file A show up in the list even though I know they're in that file.
Surely there's a way to get this to work?
07-05-2011, 03:24 AM
Isn't it always the way that 5 mins after you hit send, you figure it out anyway?
What I found I had to do was after I repathed, save the file and reload. It will error saying it can't find the objects. Then goto the XrefObject UI, select the listed file and hit the update button. And magically, it will find the objects again. And I think you also have to squint and tilt your head about 11.5 degrees too between loading and saving the file cause that's what I did. :)
07-05-2011, 04:07 AM
Have you tried calling either of the 2 commands below?updateXref <XrefObject>
objXRefMgr.UpdateAllRecords()Doing that after repathing should properly update the paths without needing to launch the UI. You could also use ATSOps to repath the xref objects.
07-05-2011, 04:40 AM
Thanks for that Eric. I just tried both options. The per-object one works great. A bit slow, but it works fine. But as I discovered when doing the update manually, you need to save and reload the file before the
07-05-2011, 04:40 AM
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.