I've been using the externalId to uniquely refer to objects in the forge viewer and connect them with outside data about these objects. This has worked well for revit files, which have a kind of GUID 86715290-fa28-4ff5-aef9-8c75d7c81e77-0012917b. Now I'm working with a Navisworks file, and their externalId use looks very different with values like a, 0 or 0/0/0/. How persistent are these, I can imagine not globally unique, but do changes/removals/additions keep them unique within the file? What is the suggested strategy to globally refer to solids in Navisworks files?
The external id of the path through the model selection tree to that element started from 0, see the snapshot below:
As I know:
In Revit case, it uses a unique id of the element (saying Element.UniqueId of the Revit API) as the externalId. However, the Navisworks doesn't have a concept unique id since it will have to handle different formats and some source models don't have unique id either. Therefore, it uses the selection tree path as the externalId instead.
Thus,
To preserve the identity information of the Revit elements, I would like to advise you to add a Revit shared parameter to store the value of the Element.UniqueId, and identify the element by this parameter.
Related
My model in Autodesk construction cloud contains several properties which I need to track. I have downloaded the sqlite file using fetch derivative download URL without any errors.
However when comparing export with what I see in ACC, or the Fetch all properties call, some properties are entirely missing. For instance, the fetch all properties call returns the 20 expected property values whereas only 3 of these values exist in the SQLite download. Any explanation why the SQLite file may be incomplete? There doesn't seem to any size restriction or filter in the call returning SQLite which may explain partial results.
It is expected that the design metadata returned via sqlite and via JSON may not be the same. For example, the metadata captured in the sqlite database use "instancing" where multiple design elements may inherit certain properties from another element (and the resolution of the inherited properties is left to whomever is reading this file). The JSON format on the other hand does not support any kind of inheritance, so properties are duplicated for each individual design element.
I have developed an application that gets the JSON object tree of a BIM 360 revit model's view, using the Forge Model Derivative endpoint, then downloads the SQLite PropertyDatabase to query properties of several object tree entities. That was working fine until now. Recently, I am having trouble with some models where the object tree derivative object ids don't match the PropertyDatabase object ids.
I have seen this post Temporary workaround for mapping between SVF1 and SVF2 IDs but this method is not valid in my case because my app works on the server side and not uses viewer API at all.
My question is: if there is a workaround using APIs from the server side, and if there are plans to solve this inconsistency between APIs shortly.
Unfortunately, this behaviour is expected with your approach. SVF and SVF2 do not share the same IDs, SVF2 IDs are optimised to process data faster and to try keeping them identical across versions. The article you make reference to is only working in the context of the Viewer, for server side processing you need to get the dbid.idx file to map IDs. This utility has a command to help you downloading the file. Try:
./forge.js version-svf2-idmap project_id version_id output_dbid.idx
This file is a gzip compressed file of a uint32 array.
What happened is that you did download the SVF SQLlite db using SVF ids. But when using the MD endpoints, you actually using the SVF2 ids because the target format is SVF2. If you did request a SVF target format, the MD endpoint would work with SVF ids. Unfortunately, you do not control BIM360 target format which could either be SVF or SVF2 depending of the source file format. For example, IFC, RVT, NWD, DWG are SVF2, but others are not. You can determine which format is used by reading the outputType and overrideOutputType. If overrideOutputType says 'svf2', then you should do the mapping.
The relevant code for the version-svf2-idmap is here
On the other hand, if you got the SQLite database, why do you need to call the MD endpoints, you got everything you need, and can extract the information much faster from there. See my example here. It has functions for properties extraction, and/or building the hierarchy tree.
I am trying to convert a SVF using linked Revit files. I uploaded a zip to model derivative API which contains all the Revit files.
After conversion, the revit files are combined into one single SVF, but I discovered that at least some of the objects might be duplicated in a weird way.
For example, I have an object which have an unique attribute defined. When I select that object, I can see its position inside the model browser, as well as its properties. (Screenshot 1)
When I try to search in the whole model using that unique attribute, I discovered that another object has the same attribute and properties. When I try to select it using its dbId, I found that the object is invisible in the model, and it does not show where does it belong inside the model browser. (Screenshot 2)
Any idea why is there a duplicated object inside the SVF? Thanks.
To send our model to Forge, we have converted(published) our DWG to DWFx file. We are doing that because DWFx files allow us to append additional properties for each element.
Is there some possibility to know the externalId property of Forge, during DWG/DWFx convertion? Maybe using the BeginEntity event of Publisher object(Autodesk.AutoCAD.Publishing Autocad.NET API)?
On this post http://thebuildingcoder.typepad.com/blog/2009/02/uniqueid-dwf-and-ifc-guid.html, Jeremy explains how translate episodeId guid + UniqueID of Revit element to DWF ID. But it was not feasible at Autocad. Do you have some clue about that?
I have done all steps that Jeremy have explained, but I did some changes in my code as change Revit UniqueId for CAD Handle, even so I could not get the externalId property.
it has been a long time without update. my apology for the delay! just fyi what might be useful about the externalId of DWFx. It can be got by the steps below:
Copy the *.dwfx file to another file with extension ".zip",
Extract the ZIP file.
View the XML file: dwf\documents\B32F5310-75D4-4AC6-98DA-F27855056814\1830A475-854B-4F12-A992-7339E636067D.content.xml
you will find such id with the object name + AutoCAD entity handle, which means when AutoCAD exports file to DWFx, it generates such id for DWFx
In spring-cloud-config, it is possible to configure a properties file and then fetch an element in the properties file using the key.
But in aws parameter store, each key value is stored as a separate entry. As i understand, i need to take each key-value from the properties file and then configure in parameter store.
In reality, each region (DEV, QA etc.) has a set of configuration files. Each configuration file has a set of properties in it. These files can be grouped based on the hierarchy support that parameter store provides.
SDLC REGION >> FILE >> KEY-VALUE ENTRIES
SDLC region can be supported by hierarchy. Key-value entries are supported by parameter store. How do we manage the FILE entity in parameter store?
you can use the path hierarchy and get parameters by path or by name prefix.
e.g.
SDLC_REGION/FILE/param1
SDLC_REGION/FILE/param2
SDLC_REGION2/FILE/param1
SDLC_REGION2/FILE/param2
then you can get by path: /SDLC_REGION/FILE to get all it parameters
another option is using tags