IPdmHooks::BeforeCloseDocument

An event occurs when you close the window of an open file.

This method takes the full path of the file to be closed.

See AfterCloseDocument.

Compatibility

Cimatron 2024 or later

Syntax

oMode = BeforeCloseDocument(iApp, iData, iOperation, iDocPath)

 

Return Type

Return: Integer

oMode—The event process mode as defined by the user. There are three options:

  • Process (0)—The user processes the event

  • Continue (1)—The user passes the control to Cimatron; the default processing of the event will be performed

  • Cancel (2)—The user cancels the event's processing

   

Input Type

Input: Object

iApp—Pointer to the application

Input: Variant

iData—Not applicable

Input: Long

iOperation—A unique number, relative to the Cimatron session, which identifies each event. For two consecutive events, the second (later) event will be identified by a greater number than the first.

This identifier is passed to both the Before and After methods of the event.

This gives you the ability to determine the scope of an event. Otherwise, due to event nesting, it would be difficult to associate a pair of Before and After method calls with one event.

Input: String

iDocPath—Full path name of the .elt file

Remarks

Example