简体   繁体   中英

How to show item in revit file using Forge Viewer?

We have a web app connected with Autodesk Forge. We were able to upload and view revit files and get the metadata of the file. Now, we want to view specific item in the file without viewing the whole file. How can we make that using the Forge Viewer??

EDIT

The correct option to pass in should be ids and not dbids , been a while since I used this so had to brush up on it...

Yes simply pass in an array of dbids for Viewer to partially load the model:

const options = {
ids: [233,2333 ...]
//...
}

viewer.start/loadModel(svfUrl, options) // or viewer.loadDocumentNode(doc, geom, options)

Note that with this approach there's no option to load the rest of the nodes back w/o reloading the entire model with their dbids passed in again.

Also note that dbids are inconsistent between conversions (they are subject to change if the model is translated again) so use externalIds of a node to map it to a component in the editor space (Revit).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM