eguerra - 2024-08-05

In the ScriptingEngine documentation there seems to be an error (or missing information) in the ScriptIecLanguageObjectContainer part ( https://content.helpme-codesys.com/en/ScriptingEngine/ScriptIecLanguageObjectContainer.html#ScriptIecLanguageObjectContainer.ScriptIecLanguageObjectContainer ).
The description of the function create_pou() doesn't specify the correct arguments requested, it only says create_pou(type: SpecialPouType) and a script using the documentation definition of the function will raise an error.
I tried passing the function arguments similar to the ones specified for the create_dut() function and it seems to work fine:
create_pou(name, PouType) , name : str

UPDATE:
The offline help has the correct definition

IExtendedObject<IScriptObject> create_pou(
    string name,
    PouType type = PouType.FunctionBlock,
    Nullable<Guid> language = null,
    string return_type = null,
    string base_type = null,
    string interfaces = null
)
 

Last edit: eguerra 2024-08-05