duplicate

Syntax

<Path>.duplicate([Destination:object, Name:string]) → object

The method duplicate duplicates, i.e., copies, the object designated by <Path> in the Class Library. Note that Plant Simulation does not preserve the inheritance hierarchy.

To create the object at a certain position in the Frame, you can use the attribute Coordinate3D.

Parameters

  • The optional parameter Destination of data type object designates the destination at which Plant Simulation creates the object.

  • The optional parameter Name of data type string designates the name of the object that will be created.

Return Value

The return value has the data type object. Plant Simulation returns the duplicated object, when it was able to duplicate the object. It returns VOID when duplicating failed.

Examples

.MaterialFlow.Conveyor.duplicate
.MaterialFlow.Conveyor.duplicate(.Models.MyPlant,"MyConveyor")
.InformationFlow.&Variable.duplicate
.InformationFlow.&Method.duplicate
var myConveyor:object := .MaterialFlow.Conveyor.duplicate(.Models.Frame,"MyConveyor")
MyConveyor.setPosition := [100, 100] // Sets the pixel coordinates.

Related Topics

Duplicate

Cut Inheritance

deleteObject

derive