Take info from Xref files inside main max file

You work in your main max file and want to apply a function to xref max files (may be in silent mod or somehow else), make some changes there, save them, update the connection to them, and get some info from there inside your main max file. Is there a need to open these files if they are already Xrefed to your scene? I'm afraid about opening in case these files are big!

fn Xref_FN =
(
xref_max_index = xrefs.getXRefFileCount()
for i = 1 to xref_max_index do
(
this_xref = xrefs.getXrefFile i
LoadMaxFile this_xref

print --(some info from there)

max file save
updateXRef this_xref
)
)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
artrender.info's picture

Thx!

OK, I understand!

Anubis's picture

need to load *.max file to can modify and save changes

no matter whether is it a xrefed or not.

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.