-- A file for file merging.
P = [100,100,100]
For I = 1 to 5 do box POS :( random p-p) -- create some boxes
Savemaxfile "mergetest. Max" -- save to file
For OBJ in objects do obj. Name = "_" + obj. Name -- rename the boxes
Objects. Pos + = [0,-1000,0] -- move them off to the side
Fobj_names = getmaxfileobjectnames "mergetest. Max" -- get the object names from the file
Deleteitem fobj_names 3 -- Delete the third name from the array
Mergemaxfile "mergetest. Max" fobj_names # select -- merge in the objects and select them
--- Merge FILE command processing method.
Selection. Count -- shocould be 4
Objects. Count -- shocould be 9
And
Mergebonesname = For I in selection collect I. Name;
Holdmaxfile () --- temporary storage scenario. If you are on a business trip, this reply method is good.
Myholdmaxfile = (getdir # autoback) + "\" + "maxhold. mx" -- create a file.
Mergemaxfile myholdmaxfile mergebonesname # prompt # skipdups # alwaysreparent # mergedups
---- Merge objects.