When reading or writing a MagicDraw model, some extra properties are set for diagrams:
type
.SysML.diagram.kind
.UPDM2.view.kind
.type
property.
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()); umlDiagram.setProperty("type", MagicDrawSysMLDiagramKind.SYSML_BLOCK_DEFINITION_DIAGRAM.getName());All SysML Diagram kinds are available in the Class
com.sodius.mdw.metamodel.uml21.xmi.di.SysMLDiagramKind
.com.sodius.mdw.metamodel.uml21.io.md.MagicDrawSysMLDiagramKind
.
Diagram umlDiagram = model.create(UMLPackage.Literals.DIAGRAM); umlDiagram.setSemanticTypeInfo(UMLDiagramKind.CLASS_DIAGRAM.getLiteral()); umlDiagram.setProperty(UPDM2ViewKind.UPDMPROPERTY_KEY, UPDM2ViewKind.OV_2.getLongName()); umlDiagram.setProperty("type", MagicDrawUPDM2DiagramKind.OV_2_OPERATIONAL_RESOURCE_FLOW_DESCRIPTION.getName());All UDPM2 Diagram kinds are available in the Class
com.sodius.mdw.metamodel.uml21.xmi.di.UPDM2ViewKind
.com.sodius.mdw.metamodel.uml21.io.md.MagicDrawUPDM2DiagramKind
.