I want to draw curve between 2 vertices of a mesh. For that I try to Use Attribute Capture with Position, and use for set start and end position of a mesh line... but it doesn't work as shown in the images below. Any help welcome.
Nodes spawning meshes require constant values - their sockets are circular. What you're connecting, are fields - their sockets are in diamond shape.
If you have some programming skills, passing a field into a circular socket is as correct as passing a function, where a value is expected instead...
I see what you're going for by deleting geometry twice, rather than just once with Compare to 0.5, Epsillon 0.6 or Equal 0 OR Equal 1. This way you have two geometries, each with just a single point - so the nodes could just pass a single value rather than a field (and maybe it will work this way in the future, who knows).
Instead of Capture Attribute, you can use an Attribute Statistic node:
And since it allows you to select stuff, you don't need to delete geometry:
Or You can use Set Position node to set the correct positions after the Mesh Line is spawned. It accepts fields, so you can use Transfer Attribute node in Index mode - and you don't even need to translate indices in your case: