private void draw_org_chart(VisioScripting.Client client, string text)
        {
            var xmldoc   = SXL.XDocument.Parse(text);
            var orgchart = VisioScripting.Builders.OrgChartBuilder.LoadFromXml(client, xmldoc);

            client.Charting.NewOrgChartDocument(orgchart);
        }
        private void draw_directed_graph(VisioScripting.Client client, string dg_text)
        {
            var dg_xml   = SXL.XDocument.Parse(dg_text);
            var dg_model = VisioScripting.Builders.DirectedGraphBuilder.LoadFromXml(client, dg_xml);

            // TODO: Investigate if this this special case for Visio 2013 can be removed
            // this is a temporary fix to handle the fact that server_u.vss in Visio 2013 doesn't result in server_u.vssx
            // gettign automatically loaded

            var version = client.Application.ApplicationVersion;

            if (version.Major >= 15)
            {
                foreach (var drawing in dg_model)
                {
                    foreach (var shape in drawing.Shapes)
                    {
                        if (shape.StencilName == "server_u.vss")
                        {
                            shape.StencilName = "server_u.vssx";
                        }
                    }
                }
            }

            client.Charting.NewDirectedGraphDocument(dg_model);
        }