Expression/constrain a object position to curve cv position

Hello everyone,

I have an animated curve, and I’d like to constrain an object’s position to one cv of the curve.

Step #1, get cv position…I’ve been trying all day. but I’m getting nowhere, and keep getting values of 0.

I’ve seen mostly old postings and using what I can.

for example

string $position = curveShape3.controlPoints[3].zValue; ## results in 0

or

string $array[] = listAttr(“curveShape5.controlPoints[2]”);

print $array[3]; ## returns lables from [0-2], then the rest looks like 0s

anyone have some experience they can share?

Hi, it’s me again,

I just figured out my mistake, and it’s not syntax or the expression.  the curve that is animated is a nhair output curve.

because it is called a output curve I figured it would return the curve cv position, but it does not, only 0.

I tested by using another curve. Dead in my tracks on this avenue, but I can explore others.