Skip to main content

Multi Functions

Multi functions can be used to string multiple functions together and control execution in more complex workflows.

Multi FunctionDescriptionSupported Integration
Batch ExecuteExecutes a specified list of functions seriallydassault_3dxperience, ptc_creo_parametric
Variable SweepExecutes a specified function for each set of variable values listeddassault_3dxperience

This list will continue to be expanded with other types of numerical algorithms. Note that multi functions can be nested, providing maximum flexibility in accommodating a large variety of workflows.

Detailed SDK Usage

Example: Update a parameter and extract model data

Demonstrates using the batch execution multi function to extract data from a modified 3DExperience model. Note that all functions are executed within the same session of the engineering tool.

job = client.add_job(
model_id = model.id,
function = "@istari:batch_execute",
tool_name = "dassault_3dexperience",
tool_version = "2023x",
operating_system = "Windows 11",
parameters = '{"func_list": [
{"name": "@istari:update_parameters", "input": {"parameters": {"wing_length": "20m"}}},
{"name": "@istari:extract", "input": { }}]}'
)

Note that the parameters json can be edited and stored in a separate file for convenience. In this scenario, use the parameters_file key to point to the external file rather than the parameters key.

Example: Extract data for a variety of model configurations

Demonstrates using a variable sweep multi function with a nested batch execution multi function to iterate over a set of variable values while updating model parameters and exporting geometry.

job = client.add_job(
model_id = model.id,
function = "@istari:variable_sweep",
tool_name = "dassault_3dexperience",
tool_version = "2023x",
operating_system = "Windows 11",
parameters = '{"variables": {"wing_len": ["10m", "15m", "20m", "25m"]},
"function": {
"name": "@istari:batch_execute",
"input": {
"func_list": [
{"name": "@istari:update_parameters", "input": {"parameters": {"wing_length": "$wing_len"}}},
{"name": "@istari:extract_geometry", "input": {"format": "stp" }}]}}}'

Note the use of the variable name wing_len in the update_parameters foundation function within the batch_execute multi function. Variable values can be used anywhere within the variable sweep function list and are accessed by using the variable name with a dollar sign $ prefix.