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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to quickly add properties in thingshape?

Snoopy_hu
11-Garnet

How to quickly add properties in thingshape?

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

How to quickly add properties in thingshape?

 

ACCEPTED SOLUTION

Accepted Solutions
Velkumar
19-Tanzanite
(To:Snoopy_hu)

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
Velkumar
19-Tanzanite
(To:Snoopy_hu)

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
11-Garnet
(To:Rocko)

Hi @Rocko 

I see. Thank you.

Velkumar
19-Tanzanite
(To:Snoopy_hu)

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