RobotStudio event

RSSDK - Saving custom attributes in Project/GraphicComponent/ProjectObject

apox ✭✭
edited September 2013 in Developer Tools

is it possible to store custom attributes to ProjectObjects, e.g. custom classes or structs (which contain some .NET properties)? When adding any non primitive object to ProjectObject.Attributes i get an error on saving the project/object. Are there any requirements or is this not supported?

Post edited by John Wiberg on


  • John Wiberg

    Hi apox,

    The generic answer is that Attributes are limited to [Int32, Int16, Double, Boolean, String, ProjectObject] as listed in the [AttributeCollection.Add] method in the manual.

    You mentioned Project and GraphicComponent in the title. On a project level you can add Documents as well. Then there is always SmartComponents with code behind.

    If you need something more specific then I'd need more details, ie what you are trying to accomplish and why?

  • Ekelund

    John is correct - currently only "primitive" types are supported (as stated in the documentation). Also be aware that the next major RobotStudio release will enforce this a bit earlier - you will get an exception when inserting the invalid data, not when trying to save it.


    Anders Ekelund
    Architect, RobotStudio