|
1 | 1 | Events always have a `name` and a `data` attribute. The contents of those attributes depend on the type of the event. |
2 | 2 |
|
| 3 | + |
| 4 | +## DocumentCreateCheckEvent |
| 5 | +`csfunctions.events.DocumentCreateCheckEvent` |
| 6 | + |
| 7 | +This event is fired when a user tries to create or copy a document. Raising an exception will prevent the creation. |
| 8 | +The event is triggered before any field calculations are performed. |
| 9 | + |
| 10 | +**Supported actions:** |
| 11 | + |
| 12 | +- [AbortAndShowErrorAction](actions.md#AbortAndShowErrorAction) |
| 13 | + |
| 14 | +**DocumentCreateCheckEvent.name:** document_create_check |
| 15 | + |
| 16 | +**DocumentCreateCheckEvent.data:** |
| 17 | + |
| 18 | +|Attribute|Type|Description| |
| 19 | +|-|-|-| |
| 20 | +|documents| list[[Document](objects.md#document)]|List of documents that are about to be created.| |
| 21 | +|attached_parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.| |
| 22 | +|attached_documents| list[[Document](objects.md#document)]|Contains the original document(s) if a document is a copy.| |
| 23 | + |
| 24 | +## DocumentModifyCheckEvent |
| 25 | +`csfunctions.events.DocumentModifyCheckEvent` |
| 26 | + |
| 27 | +This event is fired when a user tries to modify a document. Raising an exception will prevent the modification. |
| 28 | +The event is triggered before any field calculations are performed. |
| 29 | + |
| 30 | +**Supported actions:** |
| 31 | + |
| 32 | +- [AbortAndShowErrorAction](actions.md#AbortAndShowErrorAction) |
| 33 | + |
| 34 | +**DocumentModifyCheckEvent.name:** document_modify_check |
| 35 | + |
| 36 | +**DocumentModifyCheckEvent.data:** |
| 37 | + |
| 38 | +|Attribute|Type|Description| |
| 39 | +|-|-|-| |
| 40 | +|documents| list[[Document](objects.md#document)]|List of documents that are about to be modified.| |
| 41 | +|attached_parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.| |
| 42 | + |
| 43 | + |
3 | 44 | ## DocumentReleaseCheckEvent |
4 | 45 | `csfunctions.events.DocumentReleaseCheckEvent` |
5 | 46 |
|
@@ -86,6 +127,42 @@ This event is fired **after** an engineering change has been released. Raising a |
86 | 127 | |documents| list[[Document](objects.md#document)]|List of included documents.| |
87 | 128 | |parts| list[[Part](objects.md#part)]|List of included parts.| |
88 | 129 |
|
| 130 | +## PartCreateCheckEvent |
| 131 | +`csfunctions.events.PartCreateCheckEvent` |
| 132 | + |
| 133 | +This event is fired when a user tries to create or copy a part. Raising an exception will prevent the creation. |
| 134 | +The event is triggered before any field calculations are performed. |
| 135 | + |
| 136 | +**Supported actions:** |
| 137 | + |
| 138 | +- [AbortAndShowErrorAction](actions.md#AbortAndShowErrorAction) |
| 139 | + |
| 140 | +**PartCreateCheckEvent.name:** part_create_check |
| 141 | + |
| 142 | +**PartCreateCheckEvent.data:** |
| 143 | + |
| 144 | +|Attribute|Type|Description| |
| 145 | +|-|-|-| |
| 146 | +|parts| list[[Part](objects.md#part)]|List of parts that are about to be created.| |
| 147 | +|attached_documents| list[[Document](objects.md#document)]|Contains the original part(s) if a part is a copy.| |
| 148 | + |
| 149 | +## PartModifyCheckEvent |
| 150 | +`csfunctions.events.PartModifyCheckEvent` |
| 151 | + |
| 152 | +This event is fired when a user tries to modify a part. Raising an exception will prevent the modification. |
| 153 | +The event is triggered before any field calculations are performed. |
| 154 | + |
| 155 | +**Supported actions:** |
| 156 | + |
| 157 | +- [AbortAndShowErrorAction](actions.md#AbortAndShowErrorAction) |
| 158 | + |
| 159 | +**PartModifyCheckEvent.name:** part_modify_check |
| 160 | + |
| 161 | +**PartModifyCheckEvent.data:** |
| 162 | + |
| 163 | +|Attribute|Type|Description| |
| 164 | +|-|-|-| |
| 165 | +|parts| list[[Part](objects.md#part)]|List of parts that are about to be modified.| |
89 | 166 |
|
90 | 167 | ## PartReleaseCheckEvent |
91 | 168 | `csfunctions.events.PartReleaseCheckEvent` |
|
0 commit comments