Hi @nicolas.oeillet . This code gets the length of your edge and displays a message (line 13), edit line 12 to write the length into your parameter.
Dim oDoc As PartDocument = ThisDoc.Document
Dim oUOfM As UnitsOfMeasure = oDoc.UnitsOfMeasure
Dim iLogicAuto = iLogicVb.Automation
Dim oNamedEntities As NamedEntities = iLogicAuto.GetNamedEntities(oDoc)
Dim oEdge As Edge = oNamedEntities.FindEntity("A_pince_AR")
Dim oCurveEval As CurveEvaluator = oEdge.Evaluator
Dim MinParam As Double
Dim MaxParam As Double
Dim Length As Double
oCurveEval.GetParamExtents(MinParam, MaxParam)
oCurveEval.GetLengthAtParam(MinParam, MaxParam, Length)
'NameYourParam = Length
MessageBox.Show(oUOfM.ConvertUnits(Length, UnitsTypeEnum.kCentimeterLengthUnits, oUOfM.LengthUnits), "Title")