Created
January 11, 2021 20:41
-
-
Save cgillis-aras/370a586fc52b486506449f9d3f8feab2 to your computer and use it in GitHub Desktop.
Examples of the specific attribute shorthand functions in Aras Innovator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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