Representation Events

The ActivateDesignView event notifies the client when a design view representation is activated. _Pre fires before and _Post after the representation is activated.

EventNames:

  • ActivateDesignView_Pre

  • ActivateDesignView_Post

Parameters

Type

Name

Description

Document

document

Document object that indicates the document in which the change occurred.

Examples:

ActivateDesignView_Pre:

Register-InventorEvent -EventName ActivateDesignView_Pre -Action 'PreActivateDesignView'

function PreActivateDesignView($document) {
	#Write event code here
}

ActivateDesignView_Post:

Register-InventorEvent -EventName ActivateDesignView_Post -Action 'PostActivateDesignView'

function PostActivateDesignView($document) {
	#Write event code here
}

The ActivatePositionalRepresentation event notifies the client when a positional representation is activated. _Pre fires before and _Post after the positional representation is activated.

EventNames:

  • ActivatePositionalRepresentation_Pre

  • ActivatePositionalRepresentation_Post

Examples:

ActivatePositionalRepresentation_Pre:

Register-InventorEvent -EventName ActivatePositionalRepresentation_Pre -Action 'PreActivatePositionalRepresentation'

function PreActivatePositionalRepresentation() {
	#Write event code here
}

ActivatePositionalRepresentation_Post:

Register-InventorEvent -EventName ActivatePositionalRepresentation_Post -Action 'PostActivatePositionalRepresentation'

function PostActivatePositionalRepresentation() {
	#Write event code here
}

The NewDesignView event notifies the client whenever a design view representation is created. _Pre fires before and _Post after the representation is created.

EventNames:

  • NewDesignView_Pre

  • NewDesignView_Post

Parameters

Type

Name

Description

Document

document

Document object that indicates the document in which the change occurred.

Examples:

NewDesignView_Pre:

Register-InventorEvent -EventName NewDesignView_Pre -Action 'PreNewDesignView'

function PreNewDesignView($document) {
	#Write event code here
}

NewDesignView_Post:

Register-InventorEvent -EventName NewDesignView_Post -Action 'PostNewDesignView'

function PostNewDesignView($document) {
	#Write event code here
}

The NewPositionalRepresentation event notifies the client when a new positional representation is created. _Pre fires before and _Post after the positional representation is created.

EventNames:

  • NewPositionalRepresentation_Pre

  • NewPositionalRepresentation_Post

Examples:

NewPositionalRepresentation_Pre:

Register-InventorEvent -EventName NewPositionalRepresentation_Pre -Action 'PreNewPositionalRepresentation'

function PreNewPositionalRepresentation() {
	#Write event code here
}

NewPositionalRepresentation_Post:

Register-InventorEvent -EventName NewPositionalRepresentation_Post -Action 'PostNewPositionalRepresentation'

function PostNewPositionalRepresentation() {
	#Write event code here
}

The RepresentationDelete event notifies the client when a representation related object is deleted. These include positional representations and design views. _Pre fires before and _Post after the object is deleted.

EventNames:

  • RepresentationDelete_Pre

  • RepresentationDelete_Post

Parameters

Type

Name

Description

Document

document

The document the deleted object is within.

Examples:

RepresentationDelete_Pre:

Register-InventorEvent -EventName RepresentationDelete_Pre -Action 'PreRepresentationDelete'

function PreRepresentationDelete($document) {
	#Write event code here
}

RepresentationDelete_Post:

Register-InventorEvent -EventName RepresentationDelete_Post -Action 'PostRepresentationDelete'

function PostRepresentationDelete($document) {
	#Write event code here
}