Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
For a RemoteThing, is there a way to automatically create properties and bind them to unbound remote properties?
I've tried writing a local service which obtains remote properties using the GetRemoteMetadata service in the RemoteThing template. Using this, I can check each to see if each of the remote properties have already been bound. If not, then I can create a new property using the AddPropertyDefinition service.
This works but the AddPropertyDefinition service doesn't have the ability to define the cache options, so I'm getting stuck because I cannot get the new property I've created to "Fetch from remote every read" from the remote property
Is there a way to define the cache options of properties in local services? Or is there a cleverer way of automatically adding unbound remote properties?
Hi David,
I don't think there's a way to change Cache Options, neither When Disconnected, I've already did what you tried to do, and on my code there's no way of doing it. At least with standard Snippets, maybe if you dig on REST API ( looking with developer tools on the browser/Composer ) how they change it, then you can call directly the REST API in order to change it.
One important thing, when you create a property or set a Remote Binding with me.SetRemotePropertyBinding do a me.RestartThing(), otherwise the binding will not work properly.
Carles.