derive

Syntax

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

The method derive derives the object designated by <Path> in the Class Library. Note that Plant Simulation does preserve the inheritance hierarchy.

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. If this Name cannot be used because it is not unique, Plant Simulation shows an error message.

Return Value

The return value has the data type object. Plant Simulation returns the derived object, when it was able to derive the object. It returns VOID when deriving failed.

Example

.MaterialFlow.Station.derive 
// Creates a new class in the folder MaterialFlow which is derived from the object named Stationn.
var NewVariable : object := .InformationFlow.&Variable.derive
// To derive a Variable, we have to use the &-operator to prevent calling the command ‘derive’ for the value of the Variable.
var NewMethod : object := .InformationFlow.&Method.derive
// To derive a Method, we have to use the &-operator to prevent executing the Method and calling ‘derive’ for the return value.

Related Topics

Derive

Cut Inheritance

deleteObject

duplicate