[CONNECT Update 16 C++] Import of DXF file not correct for the coordinates

Hello all.

We are trying to import the contents of a Dxf file into a Dgn file.
Our DXF file as 10000 UOR per master unit, but the DGN file as 1000 UOR per master.

Here is the source code:

  void copyContentIntoAnotherFile(DgnModelRefP fromFile, DgnModelRefP destFile) const
  {
    if (fromFile == MODEL_REF_NULL || destFile == MODEL_REF_NULL)
      return;

    auto fromFileModelP = fromFile->GetDgnModelP();
    for (PersistentElementRefP const& elemRef : fromFileModelP->GetElementsCollection())
    {
      auto elemHandle = Bentley::DgnPlatform::ElementHandle(elemRef, elemRef->GetDgnModelP());
      if (elemRef->IsGraphics())
      {
        EditElementHandle eeh{ fromFile };
        DgnPlatform::ElementCopyContext copyContext(destFile);
        copyContext.SetSourceModelRef(fromFile);
        copyContext.SetLevelHandling(Bentley::DgnPlatform::CopyContextLevelOption::CopyAlways);
        copyContext.SetTransformToDestination(true); // does not change anything
        copyContext.SetWriteElements(true);
        // copyContext.SetDestinationModelRef(destFile); // does not change anything either
        if (SUCCESS != copyContext.DoCopy(eeh))
          printf("errno : %d", mdlErrno);
      }
    }
  }

[…]
    if (mdlWorkDgn_openFile (&dgnModelRef, NULL, NULL, beDgnPathName, NULL, false) == SUCCESS)
    {
      DgnAttachmentP const dxfModel = importFileAsReference(dxfPathName);
      copyContentIntoAnotherFile(dxfModel, dgnModelRef);
      mdlWorkDgn_saveChanges(dgnModelRef);
      Alm::Basic::WorkDgn_closeFile(dgnModelRef);
    }
[…]

The Dxf file has units ten times too large, which is why we have applied SetTransformToDestination(true); so that the import is done at the correct scale. However, this does not change anything, the imported content still appears too large. The same is true if we import the DXF file by reference into the active file rather than importing its graphical elements one at a time.

How could we successfully import this Dxf file with the correct coordinates please?

Thank you in advance for your answer,

Hervé