Question about dynamic bindings

Hi community,

For a custom widget I’ve done I would like to add some feature, that require dynamic bindings.
It’s for a widget that render a threejs scene directly in the mappView visu.
The new feature I would like to add is a config file to create dynamic bindings when the scene is loaded, example:

In my scene I have a 6 axis robot and I have construct the scene the way to have 6 3d components named : q1, q2, q3, q4, q5 and q6.

I have each axis positions in the PLC program exposed to OpcUa.

I would like to create a config file like this:

{
    "bndings":[
        {
            "ComponentName": "q1",
            "AttributeName": "rz",
            "OpcUaNodeId": "ns=6;s=::Program:Axis1.Position"
        },
        {
            "ComponentName": "q2",
            "AttributeName": "rz",
            "OpcUaNodeId": "ns=6;s=::Program:Axis2.Position"
        },
        {
            "ComponentName": "q3",
            "AttributeName": "rz",
            "OpcUaNodeId": "ns=6;s=::Program:Axis3.Position"
        },
        {
            "ComponentName": "q4",
            "AttributeName": "rz",
            "OpcUaNodeId": "ns=6;s=::Program:Axis4.Position"
        },
        {
            "ComponentName": "q5",
            "AttributeName": "rz",
            "OpcUaNodeId": "ns=6;s=::Program:Axis5.Position"
        },
        {
            "ComponentName": "q6",
            "AttributeName": "rz",
            "OpcUaNodeId": "ns=6;s=::Program:Axis6.Position"
        }
    ]
}

Then I want to create dynamic bindings for each config in the file. Retreive values in my widget then apply them to the 3D components, like this the user didn’t have to do thing in runtime.

I see in the documentation that dynamic bindings require a widget property, but in my case I didn’t know how many property will be bind (at least a max limit could be define).
So the question is : Is there a way to create dynamic property? If not maybe you have a work around?
Feel free to share maybe others idea :slight_smile:

Regards,
Florent

I just add a message to be able to mark it at solved and avoid bump this topic, I used Structured Properties to solve this problem.