Creates and schedules tasks based on existing custom task types or task types that you create.
You can create a custom task type using the Task Scheduler interface. You can also create a task that implements a COM interface, or you can create an executable with options that you set through command-line parameters. For instance, you can use a custom task to open a batch of text files. To use a COM interface or executable, you must know how to work in a program language such as VB.net.
Requires a list of previously created tasks.
If you want to use the custom task functionality with COM, first create a COM component which is derived from IServiceModules. The file ServiceModuleInterfaceDef.tlb, which defines the COM interface -- IServiceModules, is installed at Program Files Autodesk
Inventor [version]
Bin. There are five methods defined in the interface:
HRESULT StartTask(). Must be implemented to start the actual custom work at a scheduled time.
HRESULT KillTask(void). Reserved.
HRESULT SetOptions ([in] VARIANT varOptions). Passes in the options specified on the UI.
HRESULT GetInventorProcessID([in, out] SAFEARRAY(long)* ppsaInventorProcIDs). Retrieves Inventor process IDs for monitor usage.
HRESULT SetCommand)(*[in} enumTaskCmd enumTaskCmd). Sets the commands for pause, stop, and resume task.
In the Inventor Task Scheduler main menu, click Create Task Custom Task
.
In the Custom Task dialog box, enter a name for the new task, and click the <<...>> button near the Task Type list box.
In the Custom Task Type dialog box, click New.
In the Task Type dialog box, specify a task type name and program ID or application; then click OK.
In the Custom Task dialog box, select the new task in the Task Type menu.
Enter parameters. Here are some examples:
For a notepad.exe file, specify the name of the text file to open.
If you are converting an IDW to a DWG using a COM object, enter the .idw and .dwg filenames, using the format IDW_FULLPATH_NAME|DWG_FULLPATH_NAME|, where the symbol | is used as a separator.
E:\Datasets\Version12\part1111.idw|E:\Datasets\Version12\part1111.dwg
If you are converting an IDW to a DWG using an executable, enter the .idw and. dwg filenames, using the format IDW_FULLPATH_NAME;DWG_FULLPATH_NAME;, where the semicolon is used as a separator.
E:\Datasets\Version12\part1111.idw;E:\Datasets\Version12\part1111.dwg
Click OK.
Specify a schedule, or select the Immediately option.
Specify a time-out threshold; then click OK.