A task file is an XML document. It specifies Intent Server actions during batch processing.
The XML root element is <IntentServer >. The children element, <Project > specifies the Inventor project contexts in which the model runs.
Within the project, you specify models in one of the following ways:
-
<OpenFile > Stores the model in a text file, or inside an Inventor assembly file (IAM).
-
<IncludedModel > Embeds the model in the task file itself.
-
<NewModel > - Creates an empty model.
Within the Model tags, the following children are available:
-
<Evaluate > Evaluates an Intent expression.
-
<SetRuleValue > Modifies an Intent Rule formula.
The batch processor ignores all other elements in the task file. When batch processing finishes, the processor adds details about the evaluation and the results to the task file. The information about the specific steps is saved in attributes of the XML structure.
XML elements and their attributes
- IntentServer
- Task descriptions.
- Attributes
-
-
name
(required) Specifies the name of the batch job.
-
outputDir (required) Specifies the folder that keeps the output task file.
-
trace
(optional, default is false) If set to true, the diagnostic strings are output to console during the batch processing.
-
timing
(optional, default is
false
) If set to
true
, the output task file contains the information on start/end time of the batch job.
- Output Attributes
-
-
machine
the computer network name
-
user
the user name
-
inventor
Inventor Server version
-
start
start time
-
end
completion time
- Project
- Specifies the Inventor project that Intent Server switches to.
- Attributes
-
-
name
(required) specifies the short name of the Inventor project, or the fully qualified file name to IPJ file
-
timing
(optional, default is
false
) If set to
true
, the output task file contains the information on start/end time of the project activity
- Output Attributes
-
-
start
start time
-
end
completion time
- OpenFile
- Specifies that Intent Server loads the model from an external text file, or from an Inventor IAM file.
- Attributes
-
-
name
(required) specifies the name of the file with a model. If the fully qualified name is not provided, a search is performed in the following order:
- Task file location
- Inventor project workspace
- In the locations specified by Intent search path
-
timing
(optional, default is
false
) If set to
true
, the output task file contains the information on start/end time of the model activity
- Output Attributes
-
-
start
start time
-
end
completion time
- IncludedModel
- Specifies that Intent Server loads the embedded model from its child CDATA element.
- Attributes
-
-
name
(required) specifies the Inventor document name
-
timing
(optional, default is
false
) If set to
true
, the output task file contains the information on start/end time of the model activity
- Output Attributes
-
-
start
start time
-
end
completion time
- NewModel
- Specifies that Intent Server creates a new model on the fly.
- Attributes
-
-
name
(required) specifies the model name
-
baseDesign (required) specifies the name Root Part Design.
-
timing
(optional, default is
false
) If set to
true
, the output task file contains the information on start/end time of the model activity
- Output Attributes
-
-
start
start time
-
end
completion time
- Evaluate
- Specifies that Intent Server evaluates an Intent Expression.
- Attributes
-
-
expression
(required) specifies the Expression string
-
part
(optional, default is Root) specifies the context Part
-
timing
(optional, default is
false
) If set to
true
, the output task file contains the information on start/end time of the evaluation
- Output Attributes
-
-
result
the result string, if evaluation succeeds
-
error
the error text, if evaluation fails
-
start
start time
-
end
completion time
- SetRuleValue
-
- Attributes
- Specifies that Intent Server sets the formula of an Intent rule.
-
rule
(required) specifies the Intent rule name
-
expression
(required) specifies the expression string to be set
-
part
(optional, default is Root) specifies the Intent part containing the rule
-
timing
(optional, default is
false
) If set to
true
, the output task file contains the information on start/end time of the evaluation
- Output Attributes
-
-
result
the result string, if operation succeeds
-
error
the error text, if operation fails
-
start
start time
-
end
completion time
Example task for batch processing by Intent Server
The output XML is saved into “.\output” directory. The details on every operation are highlighted: