autodesk-forgeautodesk-viewerrevit-api

Autodesk.Viewing.MarkupsCore extension issue with Revit models that have large Project Base Point


I'm using Autodesk.Viewing.MarkupsCore extension to add markup to models. But I'm facing an issue with the Revit models that have large Project Base Point. For example in a model that the Project Base Point is about (8185296, 8185296, 50), for adding dimension there will be a distance between cursor position and the drawn dimension.

enter image description here enter image description here

(However, the original measure tool in Autodesk viewer works completely fine). enter image description here

Is there any way to avoid this issue in these models?

Edit: I'm using these options to load models in the viewer:

var modelOptions = {
    sharedPropertyDbPath: doc.getFullPath(
        doc.getRoot().findPropertyDbPath()
    ),
    applyScaling: 'm',
    applyRefPoint: true,
    isAEC: true,
};
viewer.loadModel(
    svfUrl,
    modelOptions,
    onLoadModelSuccess,
    onLoadModelError
);

Edit2: After changing the globalOffset like michael beale's answer, the quality of model reduced extremely: enter image description here


Solution

  • I noticed that this issue occurs when applyRefPoint has been set to true, like what was said in this post. So I changed it and everything seems OK.