Hi,
This question pops up several times …
Remind that the method OC requires a selection, that counts for the plain script too.
Remind that OC might fail finding the intended solution(s) while there are doubles, doubles at endpoints and so on …
A selection implies these selected entities are on layers that are visible and not locked.
It cast the new Polyline(s) on one of the layers that the entities originate from, all depends where/how it finds a startpoint.
The function returns the Polyline(s) count as an integer.
Regards,
CVH