Skip to main content
Version: 2.99

CreateDiagram

CreateDiagram This edition primitive addresses the creation of a new diagram.

Both the resource and the resource data are created through this action.


Usage

[Diagram <value> =]
CreateDiagram(
resourceName=<resourceName_path>,
resourceCenter=<resourceCenter_path>,
relativePath=<relativePath_path>[,
options])

or

[Diagram <value> =]
DIAGRAM::CreateDiagram(
resourceName=<resourceName_path>,
resourceCenter=<resourceCenter_path>,
relativePath=<relativePath_path>[,
options])

where

  • \<resourceName_path> addresses a String
  • \<resourceCenter_path> addresses a FlexoResourceCenter<?>
  • \<relativePath_path> addresses a String

Configuration

PropertyType Required 
resourceName  String  yes
resourceCenter  FlexoResourceCenter<?>  yes
relativePath  String  yes
resourceURI  String  no

  • resourceName : name for the resource to be created
  • resourceCenter : ResourceCenter where the resource should be registered
  • relativePath : relative path (relative to the resource center) where the resource should be created
  • resourceURI : URI for the resource to be created

Examples

myDiagram = AddDiagram(
resourceName='myDiagramName',
relativePath='/Diagrams',
resourceCenter=myRC);

Creates a new Diagram in resource center referenced as 'myRc', in folder '/Diagrams' and with name 'myDiagramName.diagram', and assign this new diagram to ‘myDiagram’

myDiagram = DIAGRAM::AddDiagram(
resourceName='myDiagramName',
resourceURI='anURI',
relativePath='/Diagrams',
resourceCenter=myRC);

Creates a new Diagram in resource center referenced as 'myRc', in folder '/Diagrams' with URI 'anURI' and with name 'myDiagramName.diagram' and assign this new diagram to ‘myDiagram’


Javadoc

org.openflexo.technologyadapter.diagram.fml.editionaction.CreateDiagram


See also

  • TypedDiagramModelSlot TypedDiagram : This ModelSlot represents access to a Diagram conform to a DiagramSpecification
  • FreeDiagramModelSlot FreeDiagram : This ModelSlot represents access to a Diagram without any DiagramSpecification conformance
  • GraphicalAction GraphicalAction : No documentation yet