Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transformation sheet sample #210

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

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
Collaborator

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

sheet-transformation.md Outdated Show resolved Hide resolved
sheet-transformation.md Show resolved Hide resolved
sheet-transformation.md Outdated Show resolved Hide resolved
sheet-transformation.md Show resolved Hide resolved
});

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
Collaborator

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
Collaborator

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

sheet-transformation.md Outdated Show resolved Hide resolved
sheet-transformation.md Outdated Show resolved Hide resolved
sheet-transformation.md Show resolved Hide resolved
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
2 participants