addCustomElementChange Method
This method should only be called inside addCustomChanges. It adds the provided change to the element changes maintained by this instance of ChangedInstanceIds. If the same ECInstanceId is seen multiple times, the changedInstanceIds will be modified accordingly, i.e. if an id 'x' was updated but now we see 'x' was deleted, we will remove 'x' from the set of updatedIds and add it to the set of deletedIds for the appropriate class type.
addCustomElementChange(changeType: SqliteChangeOp, ids: Id64Arg): Promise<void>
@note Custom element 'Insert' and 'Update' will mark element's parent model hierarchy and their modeled elements as 'Updated' in ChangedInstanceIds.model and element. Parent models have to be marked as 'Updated' to make sure that added change is not skipped by transformer. Transformer starts processing elements from RepositoryModel and then visits all child models. Modeled elements hierarchy is marked as updated to trigger their inserts in case a new model (or its parent) needs to be inserted.
@note Custom element 'Insert' will also mark element aspects and all element relationships as inserted.
@note It is the responsibility of the caller to ensure that the provided id is, in fact an element.
@note In most cases, this method does not need to be called. Its only for consumers to mimic changes as if they were found in a changeset, which should only be useful in certain cases such as the changing of filter criteria for a preexisting master branch relationship.
@note In data processing with filter criteria scenarios it is important to consistently filter out models and their modeled elements that were previously removed from target via addCustomModelChange or shouldExportElement apis.
Parameter | Type | Description |
---|---|---|
changeType | SqliteChangeOp | |
ids | Id64Arg |
Returns - Promise
Defined in
Last Updated: 06 March, 2025