Model SDK - Sample code to Change entity , add/delete different kinds of attributes

0
Hi, I am looking for sample code to edit attributes on an existing entity using Model SDK examples requested:  - Add string attribute of a particular length and default value - Add float attribues  - Add integers ( with default values) - Add enumerations - Add boolean - Add datetime - Delete existing attributes - Move attibutes up or down - is this possible ?      
asked
1 answers
1

Steps you should take:

1. Load all entities of a module (see example code here )

2. Find a specific entity (most classes support variable.model and from model you can call findEntityByQualifiedName(), see here )

3. Create additional Attributes using this function

4. Set properties of the new Attribute

5. Commit (see sample code here )

 

If you run into specific problems, post you code and I'll try to help you.

answered