Skip to content

Instantly share code, notes, and snippets.

@cgillis-aras
Created January 11, 2021 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cgillis-aras/370a586fc52b486506449f9d3f8feab2 to your computer and use it in GitHub Desktop.
Save cgillis-aras/370a586fc52b486506449f9d3f8feab2 to your computer and use it in GitHub Desktop.
Examples of the specific attribute shorthand functions in Aras Innovator.
Innovator inn = this.getInnovator();
Item part = inn.newItem();
/* All of the pairs of functions below are equivalent */
// Set the type attribute
part.setAttribute("type", "Part");
part.setType("Part");
// Set the action attribute
part.setAttribute("action", "get");
part.setAction("get");
// Set the ID attribute
part.setAttribute("id", "00995D4043BC48CE9D869D78C17CF0D6");
part.setID("00995D4043BC48CE9D869D78C17CF0D6");
/* Similarly, there are corresponding getType, getAction, and getID functions */
string type, action, id;
// Get the type attribute
type = part.getAttribute("type");
type = part.getType();
// Get the action attribute
action = part.getAttribute("action");
action = part.getAction();
// Get the ID attribute
id = part.getAttribute("id");
id = part.getID();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment