Managing SysML Diagrams

A SysML Diagram is a specialization of a UML Diagram

SysML Diagrams

Reading the type of a SysML Diagram

Here is a sample code that shows how to get the type of a SysML Diagram:
String type = myDiagram.getProperty(SysMLDiagramKind.SYSML_PROPERTY_KEY);

Creating a SysML Block Definition Diagram

Here is a sample code that shows how to create a Block Definition Diagram:
Diagram umlDiagram = model.create(UMLPackage.Literals.DIAGRAM);
umlDiagram.setSemanticTypeInfo(UMLDiagramKind.CLASS_DIAGRAM.getLiteral());
umlDiagram.setProperty(SysMLDiagramKind.SYSML_PROPERTY_KEY, SysMLDiagramKind.SYSML_BLOCK_DEFINITION_DIAGRAM.getLiteral());
All SysML Diagram kinds are available in the Class com.sodius.mdw.metamodel.uml21.xmi.di.SysMLDiagramKind.

Related concepts
Diagram Interchange