I have a script that i based off of one on scriptspot. All i did was add in progress bars so the scene didnt become unresponsive and took out a few functions that i didnt need. It seems to slow down considerably on the 'removing links' section. Is it just because theres probably alot of Linkcomposites in my scene?Its a revit building into max.

Deleting an object's parent sets its .parent property to undefined.Unless in some cases either the parent or the child is selected but not both, you can remove the code that sets the objects' parents to undefined and get the same result. It should save some time.

A small computation optimization you can do (though not sure it would be significant in mxs) is define a variable prog_scl = 100.0/arr at the beginning and then use progressUpdate(prog_scl * objnum). Floating point division is about one order of magnitude slower than multiplication.

Finally, a small error: objnum should be initialized to 0, not 1. As it is, if you loop through 10 objects, objnum has value 11 in the last iteration (and the progress bar is set to 110%).