Articy Forum


https://www.articy.com:443/forum/

Help writing to property in custom template feature

https://www.articy.com:443/forum/viewtopic.php?f=47&t=18192

Page 1 of 1

Help writing to property in custom template feature

Posted: Sat 6. May 2017, 01:05
by JohnRossitter
I'm working on a plugin and need a bit of help writing to a template property.
I am able to enumerate the GetAvailableProperties() method and see my items, but I can't seem to find where/how to write to them.
Any advice?

Thanks,

Re: Help writing to property in custom template feature

Posted: Mon 8. May 2017, 11:21
by [Articy] Peter Sabath
Hi John,

Reading and writing to properties can both be done by using the indexer of the ObjectProxy object.
Only some special cases or often used properties have an own getter/setter method.

If you look at the list from GetAvailableProperties() you will find two types of names:

If the name contains a dot '.' the property comes from a feature and has the form
Code: Select all
<feature-technical name>.<property-technical name>

if there is no dot in the name it is a "class" property of the object itself.

if you need to write to a specific template property just assign a value
Code: Select all
obj["myfeaturename.mypropertyname"] = value


For handling elements of a strip the read indexer give you a IList<ObjectProxy> you can use to inspect.
Changing elements such a list must be done with the Add/Remove/Insert Attachment To/From Strip methods (e.g. AddAttachmentIntoStrip( propertyname, obj )

Re: Help writing to property in custom template feature

Posted: Mon 8. May 2017, 17:19
by JohnRossitter
Awesome
Will give it a shot tonight

All times are UTC
Page 1 of 1