How to access normalizedCurveParameter of a referencePoint, on a curve ?

How to access normalizedCurveParameter of a referencePoint, on a curve ?

Anonymous
Not applicable
423 Views
2 Replies
Message 1 of 3

How to access normalizedCurveParameter of a referencePoint, on a curve ?

Anonymous
Not applicable

How to access normalizedCurveParameter of a referencePoint, on a curve ?

 

any sample code will be a big help. The question looks simple, but I am not able to see the parameter “NormalizedCurveParameter” for referencePoint.

 

In Revit 2013 it was not accessible. Is it accessible now in Revit 2019 or 2020 ?

0 Likes
424 Views
2 Replies
Replies (2)
Message 2 of 3

BardiaJahan
Advocate
Advocate

If I understand correctly you want to be able to retrieve the NormalizedCurveParameter for the reference points hosted on ReferenceCurves.... 

 

I did a little research using 'Revit Lookup' tool and this seems to be what you should do:

 

ReferencePoint refPoint;  //However you want to retrieve the point
PointElementReference pReference = refPoint.GetPointElementReference();
if (pReference is PointOnEdge)
{
     PointOnEdge pointOnEdge = pReference as PointOnEdge;
     double mValue = pointOnEdge.LocationOnCurve.MeasurementValue;
     PointOnCurveMeasurementType mType = pointOnEdge.LocationOnCurve.MeasurementType;
}

20.JPG

Message 3 of 3

Anonymous
Not applicable

Thanks for the nice explanation.

Much appreciated!

Name “PointOnEdge” is so confusing. 

I was looking for “PointOnCurve”. 

 

0 Likes