The meta input mechanism is a way to ease User Features
instantiation. It is designed to assemble objects together, and to connect
them to their environments through their inputs. It relies on a component-based
approach. Meta inputs specifications are stored in User Features.
Meta inputs:
Improve templates instantiation.
Allow better control of templates instantiation.
The architect can associate a
name to a meta input thus ensuring the selection of the corresponding
input at instantiation.
Improve the usability of templates in the Business
Process Knowledge Template workbench.
Improve the instantiation through the Knowledge
language.
The characteristics of a meta input are:
Its name
Its link to one or several real inputs. A real input cannot
be linked to several meta inputs, so when an input is associated
to a meta input, it is removed from the list of the remaining inputs.
A meta input that is not connected to any real input will not be
taken into account. If the inputs are modified, the meta inputs
will have some obsolete links to old inputs. These links are checked
each time meta inputs sub-inputs are required programmatically.
Its type (optional). This type is a Knowledge type, ranking
from parameters to mechanical specifications (Hole,
…),
products, electrical objects, User-Defined Features. This type is
an information that will prevent you from selecting objects that
do not support it. This information will also be used in the
"type
generation process"
of user features: those meta inputs will appear as attributes of
this type. If the definition of the Knowledge Template changes,
the meta input is changed accordingly (if an input disappears, no
meta input can refer to this input anymore).
Defining a User Feature Containing
a Meta Input
The step-by-step procedure provided below shows how to create a User
Feature containing a meta input.
Click User Feature
to display the User Feature Definition window, or from the
Insert menu, select Knowledge Templates > User Feature.
In the Name field, type the name of the
User Feature, then click the inputs in the specification tree or
in the geometry.
Click the Meta Inputs tab. Click
Add to create a meta input. Change its name in the Role
field.
In the Meta Inputs field, select the
input that you want to associate to the meta input and click the
button.
Repeat the above operation to associate the necessary
inputs to the meta input.
Click OK when done.
Important:
The meta input must contain sub-inputs which names are identical
to the ones defined in the template.
Instantiating a User Feature Containing a Meta Input
The step-by-step procedure provided below shows how to create a User
Defined Feature containing a meta input.
Click Instantiation From Representation
and select the file containing the template in the Object Selection window. The Insert Object dialog
box opens.
Select the input in the geometry and click
OK when done.
At instantiation, depending on an option selected in the instantiation
panel, meta inputs will be presented instead of real inputs, except
if you selected the Force meta inputs instantiation mode
(an exclusive meta-inputs instantiation mode) in the definition panel.
Inputs that remain not associated to a meta input are kept as standard
inputs even in meta inputs instantiation mode.
Important:
If you do not select the Force meta inputs
instantiation option when creating the meta input,
two different modes are available at instantiation:
MetaInputsInstantiation: The meta inputs
are displayed in the Inputs list.
MetaInputsNormalInstantiation: Even though
meta inputs are defined, you can switch to the normal
instantiation mode and select the real inputs.
If you select the Force meta inputs instantiation
option when creating the meta input, the MetaInputsInstantiation
instantiation mode is available. Inputs that remain not
associated to a meta input are kept as standard inputs even
in meta inputs instantiation mode.
Assigning a Type to
the Meta Input
You can associate a type to a meta input to make sure
that the user selects an item matching this type at instantiation.
Click User Feature
to display the User Feature Definition window, or from the
Insert menu, select Knowledge Templates > User Feature.
In the Name field, type the name of the
User Feature, then click the inputs in the specification tree or
in the geometry.
Click the Meta Inputs tab. Click
Add to create a meta input. Change its name in the Role
field.
In the Meta Inputs field, select the
input that you want to associate to the meta input and click the
button.
Repeat the above operation to associate the necessary
inputs to the meta input.
Click the ... button. The Select
a type window displays.
Select the type and click OK. The type
of the input that you will select at instantiation will have to
be identical to this type.
Click OK when done.
Important:
The types that are displayed in the Select a type
window belong to the packages you selected in the Language
tab. (Tools > Options... > Parameters and Measure).