-
From the 3DEXPERIENCE Operations section of the action bar,
click Automation Script
, and drop it
on the process diagram.
-
Double-click Automation Script
on the
process diagram to open the Automation Script Editor.
-
From the Script Type options, select
VBA.
-
From the Select Object options, select one of the following to
specify the object on which the automation script operates:
| Option | Description |
|---|
| Content |
Lets you select an object (such as a physics simulation or a physical product)
that is already a part of the simulation
process. Click
to search and select an object to add
to the simulation process as referenced
content.
|
| Parameter |
Lets you select an object parameter that refers to an object. Click to search and select an object to
refer to in an object parameter. |
-
From the App to open options, select the app in which
to run the script.
Note:
The list of apps is
controlled by the licenses that are active in your authoring session. If you do not see
the required app, go to
the Shareable Products page in to select the required licenses.
-
From the Macro library options, select one of the
following:
| Option | Description |
|---|
| Content |
Lets you select a macro library that is already a part of the simulation
process. Click to search for and select a macro
library to add to the simulation process as referenced content. |
| Parameter |
Lets you select an object parameter that refers to a macro library. Click
to search and select a macro library
to refer to in an object parameter. |
- Optional:
Next
to the Macro library field, click Open macro
libraries
to access and
manage the available macros.
The Macros dialog box opens.
From
this dialog box, you can:
- Access the
Microsoft
VBA editor to modify scripts.
- Create, run, rename, and delete macros.
For more information, see Editing a Macro
- Optional:
Enter the Macro name, which is the name of the module that
contains the macro to use with the adapter.
- Optional:
Enter the name of the Function to use with the adapter.
You can use user-defined functions within your script. A function is a group of
reusable code that can be called anywhere in your script.
- Optional:
To add function arguments, do the following:
-
From the Select function argument options,
select a parameter,
or click Create new parameter
to
create a new parameter.
The app
supports parameters of types integer, real, string, and Boolean. For more information
on creating a parameter, see Creating Activity Parameters.
-
Click Add argument to add the parameter to the list of
arguments to be passed to the function.
The parameter appears in the table of arguments.
The function arguments are the input parameters passed from an activity to a script to
dynamically control its behavior. For more information, see About the Automation Script Adapter.
- Optional:
Use the table of arguments to reorder the parameters or to delete a parameter.
Parameters are passed to the function in the order in which they appear in the
table.
- Optional:
To capture the function's return
value in a parameter, do the following:
-
Select
Capture function return in.
-
Select a parameter from the list, or click Create new
parameter
to
create a new parameter.
For more information on creating a parameter, see Creating Activity Parameters.
- Optional:
To capture an object opened or created by the script in an object parameter, do the
following:
-
Select
Capture object in.
-
Select an object parameter from the list, or click Create new
parameter
to
create a new
object
parameter.
For more information on creating a parameter, see Creating Activity Parameters.
Note:
The activity parameter's data type (real, integer, string, Boolean, or object) must
be the same as the script function's return data type.
The object parameter captures the last object opened by the script, regardless
of whether the script created the object or modified the object. The app saves
the object parameter automatically when the script completes or when you save the
simulation process. Objects created or modified by the script might not be saved. You can
include save commands in your script to save objects.
-
From the Licensing options, select one of the following:
| Option | Description |
|---|
| Use Named User Licenses |
Enables access to a license tied to a specific user for at least 30 days,
ensuring dedicated availability but limiting concurrent use across multiple
machines. |
| Use Shareable Licenses |
Allows dynamic allocation of a license to any user sequentially, optimizing
resource usage for parallel automation workflows in on-premises environments. |
-
Click OK.
|