[CONNECT V10.14.02.01 .NET] Get CurveVector of a ParametricCellElement

All,

I'm trying to get the CurveVector of a ParametricCellElement I've created so that I can use to extrude the shape using DgnExtrusionDetail.

for the extrusion I use the following code, which works when I create a LineStringElement as test case:

DPoint3d[] points = new DPoint3d[] {
    new DPoint3d(40000, 0, 0),
    new DPoint3d(50000, 0, 0),
    new DPoint3d(50000, 2000, 0),
    new DPoint3d(47000, 2000, 0),
    new DPoint3d(47000, 10000, 0),
    new DPoint3d(50000, 10000, 0),
    new DPoint3d(50000, 12000, 0),
    new DPoint3d(40000, 12000, 0),
};

LineStringElement element = new LineStringElement(Session.Instance.GetActiveDgnModel(), null, points);
element.AddToModel();
CurveVector curve = CurvePathQuery.ElementToCurveVector(element);

DgnExtrusionDetail detail = new DgnExtrusionDetail(curve, DVector3d.UnitZ * -extrusionLength, true);
SolidPrimitive solid = SolidPrimitive.CreateDgnExtrusion(detail);
Element extrudedEle = DraftingElementSchema.ToElement(Session.Instance.GetActiveDgnModel(), solid, null);
extrudedEle.AddToModel();


However whenever I try to get the CurveVector from a ParametricCellElement instead, it returns null. I've tried the following approaches:

                CurveVector curve = CurvePathQuery.ElementToCurveVector(cellElement); //Returns null

which returns null, Thinking that this may be caused between the conversion from ParametricCellElement to Element I tried accessing it using:
CurveVector curve = CurvePathQuery.ElementToCurveVector(CurvePathQuery.GetFromElementRef(cellElement.GetNativeElementRef())); //Straight up crashes

Which just crashes microstation right out.

So I tried searching for the ParametricCellElement using FindElementById
NamedGroupCollection namedGroupColl = new NamedGroupCollection(Session.Instance.GetActiveDgnModelRef());
var namedGroup = namedGroupColl.FindByElementId(cellElement.ElementId);
var ele = namedGroup.GetElement(); //ng.GetElement returns null
CurveVector curve = CurvePathQuery.ElementToCurveVector(ele); //Null refs because ele is null

However this fails to even find the element (I've double checked the IDs, and they match).


I've been unabe to find a reason for why CurvePathQuery.ElementToCurveVector wouldn't work for ParametricCellElements, or an alternative. Any pointers or suggestions would be greatly appreciated,

Thanks and regards,
Remy