Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic FlowChartX XML Documentation (Read 6520 times)
ThomasAccount
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jan 26th, 2016
FlowChartX XML Documentation
Jan 26th, 2016 at 5:12pm
Print Post  
I need to create a FlowChart XML out of an C#-CLR for later view. So my Question would be, is there an documentation on how to create a valid XML-File for the Flowchart X Control? E.g. which xml-tags are required and what for and which are not necessarily required?

Greetings
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: FlowChartX XML Documentation
Reply #1 - Jan 26th, 2016 at 6:03pm
Print Post  
Instead of generating XML, you should be able to use the ActiveX Typelib importer of Visual Studio to import FlowchartX classes into your .NET application, and then use the control's API to build the flowchart and call SaveToXml. You might also check our native .NET library, you should be able to use it to build flowcharts and save XML files compatible with ActiveX control.

If you prefer generating XML, these seem to be the minimum required tags to load something -

Code
Select All
<Diagram Version="17">
    <Nodes>
        <Node Class="std:ShapeNode" Id="0">
            <Bounds>10,10,100,100</Bounds>
            <Visible>true</Visible>
        </Node>
        <Node Class="std:ShapeNode" Id="1">
            <Bounds>210,10,100,100</Bounds>
            <Visible>true</Visible>
        </Node>
    </Nodes>
    <Links>
        <Link Class="std:DiagramLink" Id="3">
            <Origin>0</Origin>
            <Destination>1</Destination>
            <Style>1</Style>
            <SegmentCount>1</SegmentCount>
            <Points>
                <Point>110,60</Point>
                <Point>210,60</Point>
            </Points>
            <Visible>true</Visible>
        </Link>
    </Links>
    <Properties>
        <Bounds>0,0,1000,1000</Bounds>
        <DefaultShape>Rectangle</DefaultShape>
    </Properties>
</Diagram> 



You can also add tags for Text, Brush, Shape, etc... Tags correspond to property names in our .NET API though, and not the ActiveX one - the ActiveX naming is somewhat different.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
ThomasAccount
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jan 26th, 2016
Re: FlowChartX XML Documentation
Reply #2 - Feb 9th, 2016 at 3:55pm
Print Post  
Dear Slavcho,

thanks for your reply.
I tried to generate the xml file and encounter the following problem:
I wanted to add a Caption to a Box and I used the <text></text> Tag for that. This worked out fine, but I was unable to add a line break in the Text.

So my question is, how can I add line breaks in captions for boxes in the xml-file?

Greetings
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: FlowChartX XML Documentation
Reply #3 - Feb 9th, 2016 at 4:44pm
Print Post  
Dear Thomas,

We use white-space preserving XML parser; as long as the xml-builder library you are using preserves white space too you should be able to use plain CRLF sequence in the text to create new lines -

Code
Select All
<Text>line 1
line 2
line 3</Text> 



You might as well use XML amp entities to create the new-line sequence -

Code
Select All
<Text>line 1&#13;&#10;line 2</Text> 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
ThomasAccount
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jan 26th, 2016
Re: FlowChartX XML Documentation
Reply #4 - Feb 10th, 2016 at 12:56pm
Print Post  
Dear Slavcho,

Thanks for your support so far.
I generated the following XMl File:

Code
Select All
<?xml version="1.0" standalone="yes"?>
<!--FlowChartX diagram-->
<Diagram Version="11">
	<Brushes Count="4">
		<Brush Id="0" Type="Gradient">
			<Angle>90</Angle>
			<Color1>#FFFFFF00</Color1>
			<Color2>#FF404000</Color2>
		</Brush>
		<Brush Id="1" Type="Solid">
			<Color>#FFC0C0C0</Color>
		</Brush>
		<Brush Id="2" Type="Solid">
			<Color>#FFC0C0C0</Color>
		</Brush>
		<Brush Id="3" Type="Solid">
			<Color>#FFC0C0C0</Color>
		</Brush>
	</Brushes>
	<AnchorPatterns Count="4">
		<AnchorPattern Id="0">
			<Id>Decision1In3Out</Id>
			<Points Count="4">
				<AnchorPoint>
					<AllowIncoming>True</AllowIncoming>
					<AllowOutgoing>False</AllowOutgoing>
					<Color>#FF0000FF</Color>
					<Column>-1</Column>
					<MarkStyle>3</MarkStyle>
					<X>50</X>
					<Y>0</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>False</AllowIncoming>
					<AllowOutgoing>True</AllowOutgoing>
					<Color>#FFFF0000</Color>
					<Column>-1</Column>
					<MarkStyle>4</MarkStyle>
					<X>100</X>
					<Y>50</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>False</AllowIncoming>
					<AllowOutgoing>True</AllowOutgoing>
					<Color>#FF00FF00</Color>
					<Column>-1</Column>
					<MarkStyle>4</MarkStyle>
					<X>50</X>
					<Y>100</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>False</AllowIncoming>
					<AllowOutgoing>True</AllowOutgoing>
					<Color>#FFFF0000</Color>
					<Column>-1</Column>
					<MarkStyle>4</MarkStyle>
					<X>0</X>
					<Y>50</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
			</Points>
		</AnchorPattern>
		<AnchorPattern Id="1">
			<Id>Decision2In2Out</Id>
			<Points Count="4">
				<AnchorPoint>
					<AllowIncoming>True</AllowIncoming>
					<AllowOutgoing>False</AllowOutgoing>
					<Color>#FF0000FF</Color>
					<Column>-1</Column>
					<MarkStyle>3</MarkStyle>
					<X>50</X>
					<Y>0</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>False</AllowIncoming>
					<AllowOutgoing>True</AllowOutgoing>
					<Color>#FFFF0000</Color>
					<Column>-1</Column>
					<MarkStyle>4</MarkStyle>
					<X>100</X>
					<Y>50</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>False</AllowIncoming>
					<AllowOutgoing>True</AllowOutgoing>
					<Color>#FF00FF00</Color>
					<Column>-1</Column>
					<MarkStyle>4</MarkStyle>
					<X>50</X>
					<Y>100</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>True</AllowIncoming>
					<AllowOutgoing>False</AllowOutgoing>
					<Color>#FF0000FF</Color>
					<Column>-1</Column>
					<MarkStyle>3</MarkStyle>
					<X>0</X>
					<Y>50</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
			</Points>
		</AnchorPattern>
		<AnchorPattern Id="2">
			<Id>LeftInRightOut</Id>
			<Points Count="2">
				<AnchorPoint>
					<AllowIncoming>True</AllowIncoming>
					<AllowOutgoing>False</AllowOutgoing>
					<Color>#FF0000FF</Color>
					<Column>-1</Column>
					<MarkStyle>3</MarkStyle>
					<X>0</X>
					<Y>50</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>False</AllowIncoming>
					<AllowOutgoing>True</AllowOutgoing>
					<Color>#FF00FF00</Color>
					<Column>-1</Column>
					<MarkStyle>4</MarkStyle>
					<X>100</X>
					<Y>50</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
			</Points>
		</AnchorPattern>
		<AnchorPattern Id="3">
			<Id>TopInBottomOut</Id>
			<Points Count="2">
				<AnchorPoint>
					<AllowIncoming>True</AllowIncoming>
					<AllowOutgoing>False</AllowOutgoing>
					<Color>#FF0000FF</Color>
					<Column>-1</Column>
					<MarkStyle>3</MarkStyle>
					<X>50</X>
					<Y>0</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
				<AnchorPoint>
					<AllowIncoming>False</AllowIncoming>
					<AllowOutgoing>True</AllowOutgoing>
					<Color>#FF00FF00</Color>
					<Column>-1</Column>
					<MarkStyle>4</MarkStyle>
					<X>50</X>
					<Y>100</Y>
					<ChangeArrowStyle>False</ChangeArrowStyle>
					<ArrowStyle>1</ArrowStyle>
					<SegmentCount>1</SegmentCount>
				</AnchorPoint>
			</Points>
		</AnchorPattern>
	</AnchorPatterns>
	<Environment>
		<Appearance>
			<AntiAlias>Default</AntiAlias>
			<BackColor>#FFDFDFFF</BackColor>
			<ActiveMnpColor>#FFFFFFFF</ActiveMnpColor>
			<DisabledMnpColor>#FFC80000</DisabledMnpColor>
			<BkgrImagePos>0</BkgrImagePos>
			<Font>
				<Name>Tahoma</Name>
				<Size>8.25</Size>
				<Bold>False</Bold>
				<Italic>False</Italic>
				<Underline>False</Underline>
				<Strikeout>False</Strikeout>
				<Unit>World</Unit>
			</Font>
			<SelMnpColor>#FFAAAAAA</SelMnpColor>
			<ShadowColor>#FF505050</ShadowColor>
			<ShadowColorAlpha>150</ShadowColorAlpha>
			<ShadowsStyle>1</ShadowsStyle>
			<ShowAnchors>2</ShowAnchors>
			<ExpandBtnPos>0</ExpandBtnPos>
			<SelHandleSize>9.000000</SelHandleSize>
		</Appearance>
		<Behaviour>
			<AllowLinksRepeat>True</AllowLinksRepeat>
			<AllowRefLinks>True</AllowRefLinks>
			<AllowUnanchoredArrows>True</AllowUnanchoredArrows>
			<ArrowEndsMovable>True</ArrowEndsMovable>
			<ArrowsSplittable>False</ArrowsSplittable>
			<AutoScroll>True</AutoScroll>
			<Behavior>3</Behavior>
			<ExpandOnIncoming>False</ExpandOnIncoming>
			<ModificationStart>0</ModificationStart>
			<PrpArrowStartOrnt>0</PrpArrowStartOrnt>
			<RecursiveExpand>False</RecursiveExpand>
			<RestrObjsToDoc>1</RestrObjsToDoc>
			<SelectAfterCreate>False</SelectAfterCreate>
			<SnapToAnchor>1</SnapToAnchor>
			<StaticMode>False</StaticMode>
			<ShowToolTips>False</ShowToolTips>
			<HighSpeedRouting>False</HighSpeedRouting>
			<SelectAfterPaste>True</SelectAfterPaste>
			<AllowUnconnectedArrows>False</AllowUnconnectedArrows>
			<MinimizeRouteSegments>False</MinimizeRouteSegments>
			<HitTestPriority>1</HitTestPriority>
			<SelectionOnTop>True</SelectionOnTop>
			<RoundedArrows>False</RoundedArrows>
			<RoundedArrowsRadius>40.000000</RoundedArrowsRadius>
		</Behaviour>
		<Defaults>
			<ArrowBase>0</ArrowBase>
			<ArrowBaseSize>20</ArrowBaseSize>
			<ArrowColor>#FF000000</ArrowColor>
			<ArrowFillColor>#FFC0C0C0</ArrowFillColor>
			<ArrowHead>2</ArrowHead>
			<ArrowHeadSize>20</ArrowHeadSize>
			<ArrowIntermSize>12</ArrowIntermSize>
			<ArrowsSnapToNodeBorders>False</ArrowsSnapToNodeBorders>
			<ArrowSegments>1</ArrowSegments>
			<ArrowStyle>1</ArrowStyle>
			<ArrowText/>
			<BoxCustomDraw>0</BoxCustomDraw>
			<BoxesExpandable>False</BoxesExpandable>
			<BoxFillColor>#FFFFFF00</BoxFillColor>
			<BoxFrameColor>#FF000000</BoxFrameColor>
			<BoxIncmAnchor>0</BoxIncmAnchor>
			<BoxOutgAnchor>0</BoxOutgAnchor>
			<BoxSelStyle>1</BoxSelStyle>
			<ArrowSelStyle>1</ArrowSelStyle>
			<BoxStyle>0</BoxStyle>
			<BoxText/>
			<DynamicArrows>False</DynamicArrows>
			<IntermArrowHead>0</IntermArrowHead>
			<PenDashStyle>0</PenDashStyle>
			<PenWidth>1</PenWidth>
			<RouteArrows>False</RouteArrows>
			<ShadowOffsetX>3</ShadowOffsetX>
			<ShadowOffsetY>3</ShadowOffsetY>
			<TableCaption>Table</TableCaption>
			<TableCaptionHeight>22</TableCaptionHeight>
			<TableCellBorders>-515</TableCellBorders>
			<TableColumnsCount>2</TableColumnsCount>
			<TableColWidth>40</TableColWidth>
			<TableFillColor>#FFC0C0C0</TableFillColor>
			<TableFrameColor>#FF000000</TableFrameColor>
			<TableLinkStyle>0</TableLinkStyle>
			<TableRowHeight>22</TableRowHeight>
			<TableRowsCount>0</TableRowsCount>
			<TableSelStyle>2</TableSelStyle>
			<TablesScrollable>False</TablesScrollable>
			<TextColor>#FF000000</TextColor>
			<TextFormat Alignment="Center" LineAlignment="Center" XValue="37"/>
			<TableStyle>0</TableStyle>
			<ArrowTextStyle>0</ArrowTextStyle>
		</Defaults>
		<DefaultsGDI>
			<BoxBrush Id="0"/>
			<TableBrush Id="1"/>
			<ArrowBrush Id="2"/>
			<BoxPen>
				<Color>#FF000000</Color>
				<DashStyle>0</DashStyle>
				<Width>1</Width>
			</BoxPen>
			<TablePen>
				<Color>#FF000000</Color>
			</TablePen>
			<ArrowPen>
				<Color>#FF000000</Color>
			</ArrowPen>
		</DefaultsGDI>
		<Grid>
			<AlignToGrid>True</AlignToGrid>
			<GridColor>#FF8C8C96</GridColor>
			<GridSize>16</GridSize>
			<ShowGrid>False</ShowGrid>
			<GridStyle>0</GridStyle>
		</Grid>
		<Layout>
			<DocExtents Left="-5" Top="-5" Right="837" Bottom="834"/>
			<ScrollX>-5</ScrollX>
			<ScrollY>-5</ScrollY>
			<ZoomFactor>100</ZoomFactor>
		</Layout>
		<Miscellaneous>
			<MeasureUnit>2</MeasureUnit>
			<ShowDisabledHandles>True</ShowDisabledHandles>
			<FeedbackPenStyle>0</FeedbackPenStyle>
			<FeedbackPenWidth>2</FeedbackPenWidth>
			<FeedbackOnDragOver>True</FeedbackOnDragOver>
			<FeedbackColor>#FFFF8040</FeedbackColor>
			<EnableStyledText>False</EnableStyledText>
			<DragDropMode>0</DragDropMode>
			<CrossRadius>8</CrossRadius>
			<ArrowCrossings>0</ArrowCrossings>
			<AllowMultiSel>True</AllowMultiSel>
			<IconTextHeight>50</IconTextHeight>
			<IconTextWidth>100</IconTextWidth>
		</Miscellaneous>
	</Environment>
	<Boxes Count="1">
		<Box Id="0" ZIndex="0">
			<Shape>Rectangle</Shape>
			<Brush Id="3"/>
			<Pen>
				<Color>#FF000000</Color>
				<DashStyle>0</DashStyle>
				<Width>1</Width>
			</Pen>
			<Constraints Count="5">
				<Constraint Type="0">
					<Value>0</Value>
				</Constraint>
				<Constraint Type="1">
					<Value>0</Value>
				</Constraint>
				<Constraint Type="2">
					<Value>0</Value>
				</Constraint>
				<Constraint Type="3">
					<Value>0</Value>
				</Constraint>
				<Constraint Type="4">
					<Value>0</Value>
				</Constraint>
			</Constraints>
			<AnchorPattern Id="0"/>
			<BoundingRect Left="488" Top="426" Right="664" Bottom="490"/>
			<ShapeRotation>0</ShapeRotation>
			<CustomDraw>1</CustomDraw>
			<Expandable>False</Expandable>
			<Expanded>True</Expanded>
			<FillColor>#FFC0C0C0</FillColor>
			<FrameColor>#FF000000</FrameColor>
			<IncmAnchor>7</IncmAnchor>
			<Locked>False</Locked>
			<MnpHandlesMask>-1</MnpHandlesMask>
			<OutgAnchor>7</OutgAnchor>
			<PenDashStyle>0</PenDashStyle>
			<PenWidth>1</PenWidth>
			<BkgrImagePos>2</BkgrImagePos>
			<Selected>False</Selected>
			<SelStyle>2</SelStyle>
			<ShadowOffsetX>3</ShadowOffsetX>
			<ShadowOffsetY>3</ShadowOffsetY>
			<Text>aaa
aa
a
aaa</Text>
			<TextColor>#FF000000</TextColor>
			<PolyTextLayout>False</PolyTextLayout>
			<TextFormat Alignment="Center" LineAlignment="Center" XValue="37"/>
			<ToolTip/>
			<Transparent>False</Transparent>
			<Visible>True</Visible>
			<FeedbackColor>#FFFF8040</FeedbackColor>
			<FeedbackPenStyle>0</FeedbackPenStyle>
			<FeedbackPenWidth>2</FeedbackPenWidth>
			<EnableStyledText>False</EnableStyledText>
			<Printable>True</Printable>
			<RotationAngle>0.000000</RotationAngle>
			<RotateContents>False</RotateContents>
			<RotateText>False</RotateText>
			<UserData>0</UserData>
			<UserString/>
			<NumberTag>0</NumberTag>
			<AllowInplaceEdit>True</AllowInplaceEdit>
			<Obstacle>True</Obstacle>
			<Hyperlink/>
			<IgnoreLayout>False</IgnoreLayout>
			<VariantTag>AAACAAAAAAA=</VariantTag>
			<DecorationColor/>
			<AllowIncomingArrows>True</AllowIncomingArrows>
			<AllowOutgoingArrows>True</AllowOutgoingArrows>
		</Box>
	</Boxes>
	<ControlHosts Count="0"/>
	<Tables Count="0"/>
	<Containers Count="0"/>
	<Arrows Count="0"/>
	<Groups Count="0"/>
</Diagram>

 



I added three CRLF sequences between three 'a's each.
However, in FlowChart X v4.8 it shows the text in one line. What am I doing wrong?

Greetings
Thomas
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: FlowChartX XML Documentation
Reply #5 - Feb 10th, 2016 at 2:32pm
Print Post  
Dear Thomas,

It could depend on the TextStyle value of boxes. Try setting the default value to multi-line using FlowChart.TextStyle Property before loading the XML.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint