FeatureChange

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
}