This article includes an example of a configurable graph config item definition that includes an anchor item connection.


The anchor is in the background. X and Y will be pointing to an anchor item. The two items will be connected through an edge. 




Example Data

Example Configuration

 <Graph>
	<Options>
		<ObjIcons/>
	</Options>
	<NodeStyles>
		<NodeStyle name="function" fillColor="#997108" fillColor2="#ffffff" borderThickness="2" borderColor="#070707" borderType="solid"/>
		<NodeStyle name="designDomain" fillColor="#DE5050" fillColor2="#ffffff" borderThickness="2" borderColor="#070707" borderType="solid"/>
	</NodeStyles>
	<Mappings>
		<MappingAnchorItem id="1" caption="Connect Function to Design Domain">
			<Part partType="SP0054"/>
			<Part partType="SP0134"/>
		</MappingAnchorItem>
	</Mappings>
	<Context name="architecture">
		<ItemGroup name="function" select="/SP0074/SP0076"/>
		<ItemGroup name="designDomain" select="/SP0079/SP0038/SP0040"/>
		<AddParts owner="function" sid="SP0054" part="functionID" defobj="+functionID"/>
		<AddParts owner="designDomain" sid="SP0134" part="designDomainId" defobj="+functionID"/>
	</Context>
	<Node caption="Functions">
		<ForEachInContext name="architecture" group="function">
			<Node style="function">
				<AddPart owner="." partType="SP0054"/>
			</Node>
		</ForEachInContext>
	</Node>
	<Node caption="Design domain">
		<ForEachInContext name="architecture" group="designDomain">
			<Node style="designDomain">
				<AddPart owner="." partType="SP0134"/>
			</Node>
		</ForEachInContext>
	</Node>
	<ForEachInContext name="architecture" group="functionID">
		<Edge from="Context:/back::functionID" to="Context:/back::designDomainId"/>
    </ForEachInContext>
</Graph>

<MappingAnchorItem> has two required attributes.

id identifies the mapping configuration. It is a string value that must be unique within a graph.

caption is the connect option caption text.


<Part> defines a part to be connected. The partType attribute must provide the part type SID.


Example Result

When selecting two or more nodes to be connected, an option will be available to connect the selected nodes by adding the existing anchor item in one node to the rest of the selected. This enables users to work graphically directly in the view.