How to modify Vertices in LineString (3D) with MDL

Hi everyone,

I am trying to write an MDL for Microstation V8i (Select Series 4) which should transform the heights according to a certain height-modelling for different element-types.

I am using a Loop over all graphical Elements with a callback-function, which first creates an Duplicate of the MSElementDscr-Object

mdlElmdscr_duplicate(&newedP, edP);

first and afterwards calls the specific Transformation-function according to the element-type.

It works already for some Elements, like e.g. for Line_3d-Elements:

Private int HoehTrans_htransLine
(
    MSElementDescr	**edPP		// <=> Zeiger auf MSElementDescr-Objekt
)
  {
    int test1=FALSE, test2=FALSE;
    
    // Height-Transformation
    test1=test_transHPoint(&(*edPP)->el.line_3d.start);
    test2=test_transHPoint(&(*edPP)->el.line_3d.end);

    if(test1==TRUE && test2==TRUE) return TRUE;
    else return FALSE;
  }

The same thing should be done for Line_String_3d-Elements as well with the following Code:

Private int HoehTrans_htransLineString
(
    MSElementDescr	**edPP		// <=> Zeiger auf MSElementDescr-Objekt
)
  {
    int test=FALSE i;
    int pnum;
    DPoint3d** pList;

    // Speicher fuer Punktliste allokieren
    pnum=(*edPP)->el.line_string_3d.numverts;
    pList= (DPoint3d**) calloc(pnum, sizeof(DPoint3d*));
    for(i=0; i<pnum; i++) pList[i]= (DPoint3d*) calloc(1, sizeof(DPoint3d));

    // Hoehen-Transformation
    test=HoehTrans_transHList(&(*edPP)->el.line_string_3d.vertice, pnum);
    
    if(test==TRUE) return TRUE;
    else return FALSE;
  }

The connected height-transformation test-function Looks like this:

Private int test_transHList
(
    DPoint3d** pointPL,			//<=> IN/OUT: zu transformierende DPunkt3d-Liste
    int pnum					// => IN: Anzahl der Punkte in Liste
)
  {
    double dh=150.0;
    int ret=FALSE, i;
    
    if(pointPL!=NULL)
    {
        for(i=0; i<pnum; i++) pointPL[i]->z+=dh;
        ret=TRUE;
    }
    return ret;
  }

My Problem is now, that I get an Compiler-error  in the function "HoehTrans_htransLineString" for the Line

-    test=HoehTrans_transHList(&(*edPP)->el.line_string_3d.vertice, pnum);

that says:

"conversion of Parameter 1 from  'DPoint3d (*)[1]' in 'DPoint3d **' not possible"

Because the number of Vertices in the Element is not only "ONE", why  is the '(&(*edPP)->el.line_string_3d.vertice'-Parameter of the LineString-Element not  a field-pointer 'DPoint3d**' ??

Did I understand something wrong, or is it just a simple error in the Code?

In case of the Line-Element I rewrite finally in the callback-function the changed MSElementDscr-Object to file using and would like to do that with the LineString in the same way:

mdlElmdscr_rewrite(newedP, NULL, filePos);

Many thanks in advance for your help!

Best regards,

Ines Wieland