I made an example that uses Rhino.FileIo to read the 3dm file , find the objects with desired name and adds them to the current document.
Let me know if it is not clear or if you have further questions.
import_by_name.py (1.0 KB)
import rhinoscriptsyntax as rs
import scriptcontext as sc
#for testing get file next to this file named test_import.3dm
import_path = os.path.join(rs.DocumentPath(), 'test_import.3dm')
#read the 3dm
rhino_file = Rhino.FileIO.File3dm().Read(import_path)
#get table of objects in the 3dm file
rh_objects = rhino_file.Objects
#find objects in de 3dm with the name you need eg 'TestName'
name_to_find = 'TestName'
named_objects = 
for rh_object in rh_objects:
if rh_object.Name == name_to_find:
#add the found objects to the document
imported_ids = 
for name_object in named_objects:
#NOTE: passing the attributes here will not take care of possible file specific attributes
#such as layers, linetypes etc... these will have to be created separately and set to the newly created object
new_id = sc.doc.Objects.Add(name_object.Geometry , name_object.Attributes)