Here is the pattern I use to get what was added to the document:
import System
import Rhino
import scriptcontext as sc
def test_import_ply():
path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop)
filename = System.IO.Path.Combine(path, "test.ply")
filename = chr(34)+ filename + chr(34) # double-quote
# Get the runtime serial number of the next RhinoObject to be be created
start_sn = Rhino.DocObjects.RhinoObject.NextRuntimeSerialNumber
Rhino.RhinoApp.RunScript("_-import " + filename + " _weld=_yes _weldangle=22.5 _splitdisjointmeshes=_yes _modelunits=_millimeters _enter", True)
# Get the runtime serial number of the next RhinoObject to be be created
end_sn = Rhino.DocObjects.RhinoObject.NextRuntimeSerialNumber
rh_objects = []
for sn in range(start_sn, end_sn):
rh_obj = sc.doc.Objects.Find(sn)
if rh_obj:
rh_objects.append(rh_obj)
for rh_obj in rh_objects:
print(rh_obj.ObjectType)
if __name__ == "__main__":
test_import_ply()