""" 0. Save this text like ObjectReplacement.py 1. Go to Scripting\MAXScript Listener (F11) 2. Write path where the script in MAXScript Listener python.ExecuteFile "..\\ObjectReplacement.py" 3. Select objects you need to replace 4. Write name of object that will be in function ObjectReplace("Torus002") 5. Run Script (press Enter in MAXScript Listener aftere the string python.ExecuteFile "..\\ObjectReplacement.py") """ import MaxPlus def ObjectReplace(name = "name", deleteObjects=True, type = "Instance"): objects = [i for i in MaxPlus.SelectionManager.Nodes] for obj in objects[:]: nObject = MaxPlus.INode.GetINodeByName(name) if type == "Instance": Instance = nObject.CreateInstance() Instance.SetWorldPosition(obj.GetWorldPosition()) Instance.SetWorldRotation(obj.GetWorldRotation()) if type == "Copy": Copy = nObject.CreateCopy() Copy.SetWorldPosition(obj.GetWorldPosition()) Copy.SetWorldRotation(obj.GetWorldRotation()) if deleteObjects: obj.Delete() ObjectReplace(name = "Teapot001", deleteObjects = False, type = "Instance") # <- you should setup this