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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to quickly add properties in thingshape?

Snoopy_hu
10-Marble

How to quickly add properties in thingshape?

Hello,everyone!企业微信截图_17128939282188.png

How to quickly add properties in thingshape?

 

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

6 REPLIES 6

Hi @Snoopy_hu 

 

Do you mean adding property through service ?

 

https://www.ptc.com/en/support/article/CS233812

 

/VR

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?

 

ThingShape is not in the same inheritance line as ThingTemplate and therefore the services are not visible to the end user.

Snoopy_hu
10-Marble
(To:Rocko)

Hi @Rocko 

I see. Thank you.

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

Hi @Velkumar 

I really didn't think there was a way to do this, thank you so much!

Announcements


Top Tags