Sketch3DChange
The Sketch3DChange event notifies the client when the geometry of a 3D sketch changes: when geometry is added, modified (directly or by editing the value of a dimension constraint) or deleted, or when a constraint is placed or deleted in a way that changes geometry. _Pre fires before and _Post after the sketch is changed.
Placing a constraint only triggers the event if the geometry has to change (for example two lines that are not yet perpendicular). Adding a dimension constraint or deleting a constraint does not change the geometry and does not trigger the event, but editing the value of a dimension does.
EventNames:
Sketch3DChange_Pre
Sketch3DChange_Post
Parameters
Type |
Name |
Description |
|---|---|---|
document |
Document object the 3D sketch is within. |
Remarks:
Sketch changes that fire this event include adding new geometry, modifying existing geometry either directly or indirectly by editing dimension constraints, deleting geometry, and placing or deleting constraints where it will cause a change in any geometry.
Examples:
Sketch3DChange_Pre:
Register-InventorEvent -EventName Sketch3DChange_Pre -Action 'PreSketch3DChange'
function PreSketch3DChange($document) {
#Write event code here
}
Sketch3DChange_Post:
Register-InventorEvent -EventName Sketch3DChange_Post -Action 'PostSketch3DChange'
function PostSketch3DChange($document) {
#Write event code here
}