I am trying to give distance constraint to components using componentConstraint2.SetExpression(value.ToString());
componentConstraint2.SetExpression(" 100 ");
componentConstraint2.SetExpression(" -100 ");
for both positive and negative values component is moving towards negative direction.
please refer the attached images.
Set right hand side for the expression as your value
expression1 = componentConstraint1.Expression;
expression1.RightHandSide = distance;