Mapping insulation and fittings

Hello

I have solved to get the host Id with python. I now only need to map the host Id from Pipe insulation with Pipe Fittings Id
To get the right order, I just use a simple sort node, but then I need to get the element id from the sorted list with string Id’s.

I saw this topic: http://dynamobim.org/forums/topic/id-string-to-elements/

I tried the pythoncode but get this error