Modeling Events

The ClientFeatureDoubleClick event notifies the client when the user double-clicks a client feature (a feature created by an add-in). Only _Post is available.

EventNames:

  • ClientFeatureDoubleClick_Post

Parameters

Type

Name

Description

Document

document

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

Examples:

ClientFeatureDoubleClick_Post:

Register-InventorEvent -EventName ClientFeatureDoubleClick_Post -Action 'PostClientFeatureDoubleClick'

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

The ModelingDelete event notifies the client when a modeling entity is deleted. Currently features and parameters are reported. _Pre fires before and _Post after the entity is deleted.
Parameters are only reported when they are explicitly deleted, not when they are deleted because their owner is deleted. If a fillet feature is deleted, the event fires for the fillet, but not for the parameter that controls its radius.
In _Post Inventor is not in a state to handle edit operations correctly; only query operations should be performed.

EventNames:

  • ModelingDelete_Pre

  • ModelingDelete_Post

Parameters

Type

Name

Description

Document

document

The Document object that contains the entity being deleted.

Remarks

Currently the notification is limited to features and parameters. Notification for parameters is only sent when a parameter is explicitly deleted, not when it is deleted as a result of its owner being deleted. For example if you delete a fillet feature, the notification will be sent for the fillet feature, but not for the parameter that controls the fillet radius, even though the parameter is deleted as a result of the feature delete. The type of entities supported for this event may be expanded in the future.

Examples:

ModelingDelete_Pre:

Register-InventorEvent -EventName ModelingDelete_Pre -Action 'PreModelingDelete'

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

ModelingDelete_Post:

Register-InventorEvent -EventName ModelingDelete_Post -Action 'PostModelingDelete'

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

The FeatureChange event notifies the client whenever the definition of a feature in a part or assembly is modified, either by the user with the edit command of the feature or through the Inventor API. _Pre fires before and _Post after the feature is changed.
The event is not triggered when a feature only recomputes because of other changes (for example a fillet whose underlying geometry changed), or when objects the feature depends on, such as sketches or parameters, are edited.

EventNames:

  • FeatureChange_Pre

  • FeatureChange_Post

Parameters

Type

Name

Description

Document

document

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

Remarks

This is provided for features in parts and also for assembly features. A change is defined as the modification of a feature’s definition. This can occur when the end-user uses the edit command for that particular feature and when a feature is modified using the API. A feature recomputing as the result of other changes in the model is not considered a feature change. For example, if a fillet recomputes because the underlying geometry has changed, this is not considered a feature change because only the resulting geometry changed, not the definition of the fillet. Also, editing any of the various objects the feature is dependent on (sketch, parameters) is also not considered a feature change.

Examples:

FeatureChange_Pre:

Register-InventorEvent -EventName FeatureChange_Pre -Action 'PreFeatureChange'

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

FeatureChange_Post:

Register-InventorEvent -EventName FeatureChange_Post -Action 'PostFeatureChange'

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

The GenerateMember event notifies the client when an iPart or iAssembly member is generated or regenerated (create, update or regenerate). _Pre fires before and _Post after the member is generated.

EventNames:

  • GenerateMember_Pre

  • GenerateMember_Post

Parameters

Type

Name

Description

String

memberName

Name of iPart or iAssembly member. If multiple members are generated this returns the first member name

Examples:

GenerateMember_Pre:

Register-InventorEvent -EventName GenerateMember_Pre -Action 'PreGenerateMember'

function PreGenerateMember($memberName) {
	#Write event code here
}

GenerateMember_Post:

Register-InventorEvent -EventName GenerateMember_Post -Action 'PostGenerateMember'

function PostGenerateMember($memberName) {
	#Write event code here
}

The NewFeature event notifies the client whenever a new feature is created. _Pre fires before and _Post after the feature is created.
In _Post Inventor is not in a state to handle edit operations correctly; only query operations should be performed.

EventNames:

  • NewFeature_Pre

  • NewFeature_Post

Parameters

Type

Name

Description

Document

document

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

Examples:

NewFeature_Pre:

Register-InventorEvent -EventName NewFeature_Pre -Action 'PreNewFeature'

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

NewFeature_Post:

Register-InventorEvent -EventName NewFeature_Post -Action 'PostNewFeature'

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

The NewParameter event notifies the client when a new parameter is created. Parameters are created explicitly by the user (Add button in the Parameters dialog) and implicitly when dimension constraints are placed or features are constructed; the event fires in both cases. _Pre fires before and _Post after the parameter is created.
In _Post Inventor is not in a state to handle edit operations correctly; only query operations should be performed.

EventNames:

  • NewParameter_Pre

  • NewParameter_Post

Parameters

Type

Name

Description

Document

document

Document object the parameter is contained within.

Remarks

New parameters can be created explicitly by the end-user using the Add button on the Parameters dialog and they are also created implicitly as the result of placing dimension constraints and constructing features. This event provides notification in both cases.

Examples:

NewParameter_Pre:

Register-InventorEvent -EventName NewParameter_Pre -Action 'PreNewParameter'

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

NewParameter_Post:

Register-InventorEvent -EventName NewParameter_Post -Action 'PostNewParameter'

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

The ParameterChange event notifies the client when a parameter is changed (its value, units or name), regardless of the cause. _Pre fires before and _Post after the change, so the state of the parameter can be compared before and after the change.
A parameter can change by an explicit edit in the Parameters dialog or on the dimension, by being driven through an adaptive assembly, or as the result of an equation. If parameter B is defined as “A * 2”, changing A also changes B and the event fires for both A and B.

EventNames:

  • ParameterChange_Pre

  • ParameterChange_Post

Parameters

Type

Name

Description

Document

document

Document object the parameter is contained within.

Remarks

A parameter’s value can be changed in many ways. This notification is sent for any change, regardless of what caused it.

Examples:

ParameterChange_Pre:

Register-InventorEvent -EventName ParameterChange_Pre -Action 'PreParameterChange'

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

ParameterChange_Post:

Register-InventorEvent -EventName ParameterChange_Post -Action 'PostParameterChange'

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