Book a Demo

Author Topic: Magic Strings of AddNew()  (Read 3940 times)

themiyac

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Magic Strings of AddNew()
« on: June 03, 2015, 12:23:04 am »
AddNew(inputName, elementType);
The AddNew method takes two parameters the desired name of the element and the type of the element.
I was wondering where I could find an exhaustive list of the elementType strings that this method accepts (i.e along the lines of "block", and "constraintBlock" strings)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Magic Strings of AddNew()
« Reply #1 on: June 03, 2015, 03:02:42 am »
Action, Activity, ActivityParameter, ActivityPartition, ActivityRegion,
Actor, Artifact, Change, Class, Collaboration, Component, Decision, DeploymentSpecification, DiagramFrame, Entity, Event, GUIElement, InteractionFragment, InteractionOccurrence, Interface, InterruptibleActivityRegion, Issue,
Node, Object, Part, Requirement, Screen, Sequence, State, StateNode and UseCase

A number of elements are not visible in the project browser:
Association, Boundary, Constraint, EmbeddedElement4, InteractionState, Note, Synchronization and Text

Creation of the Association is further limited to package level. This is also the case for the following types:
ExceptionHandler, ExpansionRegion, Report, TimeLine and UMLDiagram

Furthermore (and finally) there are two more of the kind but you are only allowed to create them
inside an Activity:
EntryPoint, ExitPoint, Port, ProvidedInterface and RequiredInterface

(copy/paste from my Scripting book; got that from various sources somewhere in the help)

q.
« Last Edit: June 03, 2015, 03:06:02 am by qwerty »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Magic Strings of AddNew()
« Reply #2 on: June 03, 2015, 08:49:04 am »
I think you can use profile metatypes as the type too. eg. "SysML1.3::Block"