-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
derbynn
commented
Oct 2, 2024
- Write up the recent example in transforming a sheet and all of its content to a target iModel
sheet-transformation.md
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe hyperlink to https://www.itwinjs.org/reference/core-backend/models/documentlistmodel/?
https://www.itwinjs.org/reference/core-backend/elements/sheet/
https://www.itwinjs.org/reference/core-backend/models/sheetmodel/
Mention that a sheet is a document element
There was a problem hiding this comment.
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
}); | ||
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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>
…/iTwin/imodel-transformer into daniel/transformer-sheets-sample