Is it possible to extrude a model line using API? could anybody explain how?

is it possible to extrude a model line using API? could anybody explain how?

In Dynamo as a new geometry, or in Revit as a new object?

in revit as a new object

Like this?

if i select another line, this extrusion will terminate and another line will extrude. How can resolve this issue

You can run in Dynamo player for consecutive work…