This is what I have thus far:
macroScript My_Edge_Remove category: "My Tools" buttonText: "Kyle's Edge Remove3" tooltip:"Remove edges and clean verts3" ( oper=false for x = 1 to $.modifiers.count do ( if ((ClassOf $.modifiers[x])== Edit_Poly) and (oper=false) then if subobjectLevel==2 then $.modifiers[x].ButtonOp #RemoveEdgeRemoveVertices oper=true if subobjectLevel==1 then $.modifiers[x].ButtonOp #RemoveVertex oper=true ) if oper==false then $.EditablePoly.Remove () )
this code seems to work correctly if the object is only an editable poly, however, If an edit poly modifier is added later the script only seems to remove verts when I use it under selection level 1 of this modifier. If I use the script under selection level 2 in the edit poly modifier then there is simply no result, no error message appears on the screen or in the Listener. The same is true if after adding the edit poly modifier I go back down to edit the editable poly level of the hierarchy, though this does yield an "--Unknown system exception" error after a few attempts. If anyone knows how to directly get the currently selected modifier from 3ds max that would be more efficient than looping through and trying to find an Edit_Poly modifier in the hierarchy.
Any help would be greatly appreciated!