How can I assign a characteristic using DPL?

Category:
Scripting
Answer

Acharacteristic is assigned by an invisible object. This object is of the class "ChaRef" and it is stored IN the object you want to apply the characteristic to. Assumed that the load is the target then the ChaRef object has to be stored in the load element. If the load flow power should be changed by the characteristic then the target parameter is "plini". The ChaRef object has to have the same name. The link to the actual characteristic object in the library is established by setting the parameter "typ_id" of the ChaRef to the characteristic.

The attached project contains a script showing all relevant parts.

The needed DPL code is also given below:

ChaRef = ElmLod.CreateObject('ChaRef','plini');

ChaRef:typ_id = ChaTime; !or any other characteristic

 

Back