I heard back from the development team:
Reading through the thread, what I gather is, the user wants to change the geometry in an existing DirectShapeType. Depending on what version of Revit API they're targeting, we have an older API that is widely used which is Autodesk.Revit.DB.DirectShapeType.SetShape:
https://www.revitapidocs.com/2023/d8642243-fb35-0cbe-08d8-df4518929946.htm
It overwrites the shape, just like when the DirectShapeType was originally created.
That is the oldest API that exists; an AppendShape was later added which doesn't overwrite, but just appends.
Then we added an externally tagged geometry based API where you can add geometry and give them unique names. This is `AddExternallyTaggedGeometry`:
https://www.revitapidocs.com/2023/2c551429-8b90-ed46-3e29-a6b3dbc1cb95.htm
There are two convenience methods to delete existing externally tagged geometry:
- `RemoveExternallyTaggedGeometry` that takes an `ExternalGeometryId`, and
- `ResetExternallyTaggedGeometry` which clears all `ExternallyTaggedGeometry`.
There's also a convenience method `UpdateExternallyTaggedGeometry`, which updates an existing `ExternallyTaggedGeometry`.
The advantage of `ExternallyTaggedGeometry` is, if you've got something conceptually the same but it has changed representation (e.g., a line has moved), and you had references (e.g., dimensions) to it, then updating the externally tagged geometry can preserve the dimensions, so long as it still makes geometric sense (swapping a line for an arc probably doesn't make sense).
So, calling `DirectShapeType.SetShape` will not remove any extant `ExternallyTaggedGeometry`. They are separate universes, hence the ResetExternallyTaggedGeometry.
For this user, my guess is they used SetShape originally and should just need to setup a transaction and call SetShape again.
If the DirectShapeLibrary is in use, that could cause some issues, but I don't see mention of that.
As you can see from the speculation in the answer, the analysis is significantly simplified and more efficient the more specific details are provided in the original question.