How to quickly add properties in thingshape?
Apr 11, 2024
11:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 11, 2024
11:53 PM
How to quickly add properties in thingshape?
Labels:
- Labels:
-
Containers
ACCEPTED SOLUTION
Accepted Solutions
Apr 12, 2024
07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 12, 2024
07:39 AM
Hi @Snoopy_hu
As @Rocko mentioned it is not visible to the end user. But you can create custom service to do it
ThingShapes["SHAPE_NAME"].AddPropertyDefinition({
indexed: undefined /* BOOLEAN {"defaultValue":false} */,
defaultValue: undefined /* STRING */,
remoteBindingAspects: undefined /* JSON */,
description: undefined /* STRING {"defaultValue":""} */,
readOnly: undefined /* BOOLEAN {"defaultValue":false} */,
type: undefined /* BASETYPENAME */,
remote: undefined /* BOOLEAN {"defaultValue":false} */,
remotePropertyName: undefined /* STRING */,
timeout: undefined /* INTEGER {"defaultValue":0} */,
pushType: undefined /* STRING */,
dataChangeThreshold: undefined /* NUMBER */,
logged: undefined /* BOOLEAN {"defaultValue":false} */,
name: undefined /* STRING */,
pushThreshold: undefined /* NUMBER */,
dataChangeType: undefined /* STRING */,
category: undefined /* STRING */,
persistent: undefined /* BOOLEAN {"defaultValue":false} */,
dataShape: undefined /* DATASHAPENAME */
});
/VR
6 REPLIES 6
Apr 12, 2024
12:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 12, 2024
12:40 AM
Hi @Snoopy_hu
Do you mean adding property through service ?
https://www.ptc.com/en/support/article/CS233812
/VR
Apr 12, 2024
01:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 12, 2024
01:44 AM
Hi @Velkumar
Thanks! I would like to add multiple attributes through a service, I tried the help you provided and found it, but unfortunately why doesn't thingshape have this service?
Apr 12, 2024
03:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 12, 2024
03:00 AM
ThingShape is not in the same inheritance line as ThingTemplate and therefore the services are not visible to the end user.
Apr 14, 2024
10:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 12, 2024
07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 12, 2024
07:39 AM
Hi @Snoopy_hu
As @Rocko mentioned it is not visible to the end user. But you can create custom service to do it
ThingShapes["SHAPE_NAME"].AddPropertyDefinition({
indexed: undefined /* BOOLEAN {"defaultValue":false} */,
defaultValue: undefined /* STRING */,
remoteBindingAspects: undefined /* JSON */,
description: undefined /* STRING {"defaultValue":""} */,
readOnly: undefined /* BOOLEAN {"defaultValue":false} */,
type: undefined /* BASETYPENAME */,
remote: undefined /* BOOLEAN {"defaultValue":false} */,
remotePropertyName: undefined /* STRING */,
timeout: undefined /* INTEGER {"defaultValue":0} */,
pushType: undefined /* STRING */,
dataChangeThreshold: undefined /* NUMBER */,
logged: undefined /* BOOLEAN {"defaultValue":false} */,
name: undefined /* STRING */,
pushThreshold: undefined /* NUMBER */,
dataChangeType: undefined /* STRING */,
category: undefined /* STRING */,
persistent: undefined /* BOOLEAN {"defaultValue":false} */,
dataShape: undefined /* DATASHAPENAME */
});
/VR
Apr 14, 2024
10:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 14, 2024
10:03 PM
Hi @Velkumar
I really didn't think there was a way to do this, thank you so much!
