Reputation: 7
I am currently working with several Revit files in an Autodesk Construction Cloud (ACC) project. One of these files includes the site and landscaping details, while another incorporates the foundation of the building. When working within Revit, linking these files together works seamlessly since they both utilize the same project base point, ensuring accurate placement of the foundation.
However, the issue arises when attempting to load these files simultaneously into a single instance of the 3D viewer. The alignment between the files is lost. As I understand, the 3D viewer centers the bounding box of the geometry within the 3D world. Moreover, I am aware that the SVF2 format used during the derivation process does not retain any data regarding the project's coordinate system.
Given these constraints, I am interested in learning if there's a possible workaround that enables loading multiple files into a single 3D viewer instance and aligning them based on their Revit origins, as opposed to centering around the bounding box. Any assistance or insights to address this concern would be greatly appreciated.
I am able to successfully interact with the APS API and load multiple Revit files that have been uploaded to an ACC project into the same instance of the viewer. However, they are not aligned to each other in the same way that they were in Revit.
Upvotes: 0
Views: 344
Reputation: 7070
We can align Revit models in APS Viewer with the below ways, but please ensure your Revit models are aligned well with the alignment you want to achieve in the viewer.
I put the logic in my MultipleModelUtil.js, and demonstrated this tool in this lightning talk: Aggregation, linked models, and group: advanced Revit model viewing in Autodesk Forge
globalOffset
of the 1st model to others. (if the models are co-origin of the Revit internal origin, applying the same globalOffset
to the models should make them aligned well in the viewer)
const util = new MultipleModelUtil( viewer );
util.options = {
alignment: MultipleModelAlignmentType.OriginToOrigin
};
util.processModels( models );
const util = new MultipleModelUtil( viewer );
util.options = {
alignment: MultipleModelAlignmentType.CenterToCenter
};
util.processModels( models );
applyRefpoint: true
and make the globalOffset
to the refPoint
. (AEC model data is required)
const util = new MultipleModelUtil( viewer );
util.options = {
alignment: MultipleModelAlignmentType.ShareCoordinates
};
util.processModels( models );
ref:
Upvotes: 0
Reputation: 25
There are a few ways to align the models after translation, but the only way I've found to align them based on Revit coordinates is to package all files as a zip file, the upload it, specifying which file is the 'main' one that the references tie back to.
This tutorial shows it in Postman (with an STL file, but Revit is the same), you can also try it easily with the Visual Studio Code Plugin (under advanced settings when uploading, I think): https://aps.autodesk.com/en/docs/model-derivative/v2/tutorials/translate-zip-to-stl/. I'm not as familiar with ACC projects, so I don't know how that would connect.
Also note that only the views and sheets specified in the main file will be available in the viewer, but 3D content from all files will be aligned in the right place. Element IDs for the linked files will get a prefix with the model id, i.e. [element id] in the main file, [model id]/[element id] in the references.
Upvotes: 0