Skip to content

Commit 0f9a16f

Browse files
author
Jens Kürten
committed
add documentation
1 parent 86c329f commit 0f9a16f

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

docs/reference/events.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
Events always have a `name` and a `data` attribute. The contents of those attributes depend on the type of the event.
22

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+
344
## DocumentReleaseCheckEvent
445
`csfunctions.events.DocumentReleaseCheckEvent`
546

@@ -86,6 +127,42 @@ This event is fired **after** an engineering change has been released. Raising a
86127
|documents| list[[Document](objects.md#document)]|List of included documents.|
87128
|parts| list[[Part](objects.md#part)]|List of included parts.|
88129

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.|
89166

90167
## PartReleaseCheckEvent
91168
`csfunctions.events.PartReleaseCheckEvent`

0 commit comments

Comments
 (0)