 | CAEXSequenceOfCAEXObjectsTInsert Method |
Inserts the specified element into this sequence. If nothing is specified the element is added.
If the asFirst is set to true, the element is prepended to already existing ones. If a UniqueNameService
can be located, the name of the inserted element is changed to be unique.
Namespace: Aml.Engine.CAEXAssembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntaxpublic override T Insert(
T sourceCAEXObject,
bool asFirst = true
)
Public Overrides Function Insert (
sourceCAEXObject As T,
Optional asFirst As Boolean = true
) As T
public:
virtual T Insert(
T sourceCAEXObject,
bool asFirst = true
) override
Parameters
- sourceCAEXObject T
- The CAEX object.
- asFirst Boolean (Optional)
-
optional parameter, if set to true (default) the element is prepended to already existing ones,
otherwise it is appended.
Return Value
T
The inserted CAEX object. If the provided CAEX object already belongs to a sequence, a copy of the CAEX object is
inserted and
returned as the result.
Exceptions
Remarks
If the provided CAEX object already has an associated parent, a deep
copy of the CAEX object and not the original provided CAEX Object is inserted. Please keep in mind, that the copied
object
contains identical attributes and elements. It might not represent a valid AutomationML object, because IDs and
references are
not automatically modified.
See Also