The OnFileInsertNewDialog event notifies the client whenever the end-user executes the Create Component command within an assembly.
TemplateDir |
String |
The default template directory as defined in the File tab of the Application Options dialog. This information can be used by the client in their dialog to allow the end-user to select one of the standard templates. |
FileTypes |
String |
A list of the file types displayed in the "Files of Type" combo box on the Open dialog. For example, when the Derived Component command is executed the array contains the following strings: "Part Files (*.ipt)|*.ipt" "Assembly Files (*.iam)|*.iam" |
DocumentObject |
Document |
The AssemblyDocument object the new component will be created within. |
ParentHWND |
Long |
The Windows handle of the Inventor Application window. If the client displays their own dialog they can use this to associate their dialog to the Inventor window. This results in better behavior between the client dialog and Inventor. For example, the client window will stay on top of Inventor and if the Inventor window is collapsed the client dialog will also be collapsed. |
TemplateFileName |
String |
The full filename of the file to use as the template when creating the new component. This can be any existing file and is not restricted to the files within the default template path. If this argument is not set, then the default part or assembly template will be used for the component. The type of document is determined based on the extension of the filename supplied in the Filename argument. This argument is ignored unless the HandlingCode argument is set to kEventHandled. |
FileName |
String |
The full filename of the file to be created. When creating a component in-place, the component is created in memory and is not written to disk until the end-user performs a save of the file. Because the filename is specified during the creation of the component the end-user will not be prompted for a filename during the save operation. This argument is required if the HandlingCode is set to kEventHandled. |
RelativeFileName |
String |
Not used. |
LibraryName |
String |
Not used. |
CustomLogicalName |
Byte |
An array of Bytes that could have been defined by an application as an additional identifier for this document. |
Context |
NameValueMap |
Input object that can be used to determine the context of why the event fired. No context information is provided for this event. See Remarks for valid NameValueMap values. |
HandlingCode |
HandlingCodeEnum |
Output that indicates how you are handling the event. This can supply any of the following three values\: * kEventNotHandled\: Inventor continues with its standard behavior and displays the "Create In-Place Component" dialog to allow the end-user to specify the component information. * kEventHandled\: Indicates that the client is handling getting the component information. Requires that the client also set, at least, the FileName argument with the full filename of the component to be created. * kEventCanceled\: Cancels the operation. |