Cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining DatumPlane from WaveDatum

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hello everyone!

I have a code that works well for me

foreach (Feature feature in workPart.Features)
{
    if (feature.FeatureType.Equals("DATUM_PLANE"))
    {
        DatumPlaneFeature datumPlaneFeature = (DatumPlaneFeature)feature;
        DatumPlane datumPlane = datumPlaneFeature.DatumPlane;
    }
}

But now I need to work with linked Datum planes and therefore feature type is WaveDatum. It does not work anymore - cannot convert from WaveDatum to DatumPlaneFeature. I'm quite stuck here. How do I obtain DatumPlane from WaveDatum???

2 REPLIES

Re: Obtaining DatumPlane from WaveDatum

Honored Contributor
Honored Contributor

You can use the wave datum's .GetEntities method to get the datum plane.

Re: Obtaining DatumPlane from WaveDatum

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

It has already dawned on me after I posted this quiestion. Thanks anyway!