ExportContext generates identical symbol IDs for linked documents with different design options

ExportContext generates identical symbol IDs for linked documents with different design options

ebarMLN7G
Enthusiast Enthusiast
426 Views
2 Replies
Message 1 of 3

ExportContext generates identical symbol IDs for linked documents with different design options

ebarMLN7G
Enthusiast
Enthusiast

We use IExportContext APIs to export 3D geometry from Revit. We are running into issues where the model is controlled through design options.

 

Here is what we are doing:

 

In document A, we have a few design options. Let's say we control the location of the door through the design options.

 

Screen Shot 2021-06-21 at 11.06.46 AM.png

We then add multiple instance of document A to document B. From the 3D view in document B we can select which version of document A is displayed through:

 

 Visibility/Graphic Overrides > Revit Links > Display Settings (custom) > RVT Link Display Setting > Design Option

 

Screen Shot 2021-06-21 at 11.05.56 AM.png

 

Screen Shot 2021-06-21 at 10.39.37 AM.png

 

Screen Shot 2021-06-21 at 10.39.55 AM.png

When we process document B, we receive all the instances of document A with identical node IDs. Since we cache the geometry for the symbols that we have already received, when we see the identical symbol ID, we reused the cached geometry that we have already received. 

 

What’s the best way to handle this situation without assuming all instances are different?

0 Likes
Accepted solutions (1)
427 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

Good question. Tricky. I asked the devteam for you.

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

... and heard back as follows:

 

A. The problem is that they have cached the graphics/geometry in a situation where they can vary.  The ExportContext does provide other ways to get at the graphics directly but you will lose the possibility of caching. 
 
B. In the described scenario, Revit links are also involved, so it is my expectation that instancing as a concept does not apply.
 
C. In our implementation we assume that linked models linked in different times have instance-specific geometry. That is, we don't cache across two instances of a linked model, only within a link instance. There are tons of ways to achieve a model which would break if you assume that instances are the same, so we assume that all instances are different. 
 
D. This matches my understanding as well.
 
I think that pretty much covers it. I hope this helps.
  
Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes