cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Is there a way to create a large number of properties at once in a Thing?

JA_9980354
7-Bedrock

Is there a way to create a large number of properties at once in a Thing?

Apologize if this has been asked before, can't seem to find a similar question on the forums.

 

Is there a way to load a large number of properties into a Thing at once? I have over 450 Boolean alarms from Kepware I'd like to load into a Thing so I can monitor them in a Mashup. I could do "Manage Binding" and load all tags; but each tag in Kepware has the name of the PLC tag address so I'd have to change the name in "Manage Binding" one by one which will take a long time.

 

Anyone have any ideas?

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:JA_9980354)

You can script it, there are services to create the Properties as well as services to retrieve the tags from your industrial connection and make the connections.

Remember to execute RestartThing after creation is done.

View solution in original post

4 REPLIES 4
PaiChung
22-Sapphire I
(To:JA_9980354)

You can script it, there are services to create the Properties as well as services to retrieve the tags from your industrial connection and make the connections.

Remember to execute RestartThing after creation is done.

Hi PaiChung,

 

Thank you for the help! This makes complete sense. Currently learning how to script in ThingWorx but will reply back here once I figure it out so other people can see or if I need additional help.

slangley
23-Emerald II
(To:JA_9980354)

Hi @JA_9980354

 

If you feel the response from @PaiChung allowed you to resolve your issue, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

In case anyone looks at this thread, this is the code I used. It doesn't retrieve tags from the Industrial connection since wanted to link up addresses to certain properties. I created the array in Excel since that's where we keep track of what tags link to what addresses. Very useful! Been using it on everything Thing instead of manual binding. 

 

//properties names and Kepware addresses 
propertiesAndAddresses = ["propertyName","address",...];

for(var i = 0; i < propertiesAndAddresses.length - 1; i+=2){
    var aspects = { 
        "tagAddress": propertiesAndAddresses[i+1],
        "scanRate": 500,
    };
    
    me.SetRemotePropertyBinding({ 
        propertyName: propertiesAndAddresses[i], // STRING
        aspects: aspects // JSON
    }); 
}

me.RestartThing();
Announcements


Top Tags