Skip to content

Add transformation sheet sample#210

Open
derbynn wants to merge 16 commits intomainfrom
daniel/transformer-sheets-sample
Open

Add transformation sheet sample#210
derbynn wants to merge 16 commits intomainfrom
daniel/transformer-sheets-sample

Conversation

@derbynn
Copy link
Contributor

@derbynn derbynn commented Oct 2, 2024

  • Write up the recent example in transforming a sheet and all of its content to a target iModel

throw new Error("A sheet must be named.");
}

// create a blank sheetModelId(where we will insert the sheet data), create documentListModel (where we will insert list of document elements)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

});

const importer = new IModelImporter(iModel);
importer.doNotUpdateElementIds.add(documentListModelId); // Do not update the documentListModelId, this is the one we've created for this iModel to receive the sheet template.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
importer.doNotUpdateElementIds.add(documentListModelId); // Do not update the documentListModelId, this is the one we've created for this iModel to receive the sheet template.
importer.doNotUpdateElementIds.add(documentListModelId); // Do not update the documentListModelId, this is the one we've created for this iModel to receive the sheet template. We do this in order to keep the properties of the documentListModel that we set in `createSheetInternal`. Without this line the documentListModel's properties in the source iModel overwrite the target iModel's documentListModel.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you format this? It might need to be on two lines if its too long

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

derbynn and others added 12 commits October 3, 2024 13:07
Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com>
Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com>
Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com>
Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com>
Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com>
Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com>
Co-authored-by: Nick Tessier <22119573+nick4598@users.noreply.github.com>
@derbynn derbynn marked this pull request as ready for review October 4, 2024 14:43
@derbynn derbynn requested review from a team as code owners October 4, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a samples.md file and write up the recent example in transforming a sheet and all of its content to a target iModel

2 participants