Sample config

############################################################
# Defining the new diagram type: shape type, name, icons
#

model.diagramType.sd=SampleDiagram

resource.element.SampleDiagram.name = "Sample Diagram"
resource.element.SampleDiagram.diagramName = "Sample"
resource.element.SampleDiagram.icon.small = "Treeviews/tv-sam-diagram.gif"
resource.element.SampleDiagram.icon.large = "DiagramTypes/SampleDiagram.gif"

############################################################
# Defining the icons for new elements. This icons will be
# used on treeview
#

resource.element.sdEntity.icon.small = "Treeviews/tv-sdEntity.gif"
resource.element.sdAttribute.icon.small = "Treeviews/tv-attrib.gif"

############################################################
# Defining the toolbar for diagram
#

diagram.toolbar.button.SampleDiagram.Entity =
\ node = createNode("sdEntity");
\ node->setProperty("uniqueName","Entity")
diagram.toolbar.button.SampleDiagram.Entity.icon = "SampleDiagram/entity.gif"

diagram.toolbar.button.SampleDiagram.Relationship =
\ link = createLink("sdRelationship");
\ link->setProperty("uniqueName","Relationship")
diagram.toolbar.button.SampleDiagram.Relationship.icon = "SampleDiagram/relationship.gif"

############################################################
# Defining the viewmap for diagram
#

view.map.*.sdEntity.isTopLevel() =
\ setGraphicObject("Cube");
\ setLayoutConstraints(minWidth(20),minHeight(20),
\ preferredWidth(100),preferredHeight(100),
\ canShiftX(true),canShiftY(true));
\ name = addCompartment("RectangleInvisible","Name");
\ name->setLayoutConstraints(horizontalAlign("left"),verticalAlign("top"),
\ widthAlign("parentDefined"));
\ nameLabel = addToCompartment(label(getProperty("$name")),"Name");
\ nameLabel->setInplaceEditor({property:="$name",default:=true});
\ nameLabel->setAlignment("Center");
\ nameLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\ setCanHaveLinks()