当前位置: 首页>>代码示例>>C#>>正文


C# EA.SaveDiagram方法代码示例

本文整理汇总了C#中EA.SaveDiagram方法的典型用法代码示例。如果您正苦于以下问题:C# EA.SaveDiagram方法的具体用法?C# EA.SaveDiagram怎么用?C# EA.SaveDiagram使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EA的用法示例。


在下文中一共展示了EA.SaveDiagram方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetLineStyleDiagram

        //--------------------------------------------------------------------------------------------------------------
        // SetLineStyleDiagram  Set line style for a diagram (all visible connectors)
        //--------------------------------------------------------------------------------------------------------------
        // linestyle
        // LH = "Line Style: Lateral Horizontal";
        // LV = "Line Style: Lateral Vertical";
        // TH  = "Line Style: Tree Horizontal";
        // TV = "Line Style: Tree Vertical";
        // OS = "Line Style: Orthogonal Square";
        // OR =              Orthogonal Round
        // A =               Automatic
        // D =               Direct
        // C =               Customer       


        public static void SetLineStyleDiagram(EA.Repository rep, EA.Diagram d, string lineStyle)
        {
            // store current diagram
            rep.SaveDiagram(d.DiagramID);
            // all links
            foreach (EA.DiagramLink link in d.DiagramLinks)
            {
                if (link.IsHidden == false)
                {
                    SetLineStyleForDiagramLink(lineStyle, link);
                }

            }
            rep.ReloadDiagram(d.DiagramID);
        }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:30,代码来源:Util.cs

示例2: SetLineStyleDiagramObjectsAndConnectors

        //--------------------------------------------------------------------------------------------------------------
        // SetLineStyleDiagramObjectsAndConnectors  Set line style for diagram objects and connectors
        //--------------------------------------------------------------------------------------------------------------
        // linestyle
        // LH = "Line Style: Lateral Horizontal";
        // LV = "Line Style: Lateral Vertical";
        // TH  = "Line Style: Tree Horizontal";
        // TV = "Line Style: Tree Vertical";
        // OS = "Line Style: Orthogonal Square";
        // OR =              Orthogonal Round
        // A =               Automatic
        // D =               Direct
        // C =               Customer 
        // B =               Bezier
        public static void SetLineStyleDiagramObjectsAndConnectors(EA.Repository rep, EA.Diagram d, string lineStyle)
         {
             EA.Collection selectedObjects = d.SelectedObjects;
             EA.Connector selectedConnector = d.SelectedConnector;
             // store current diagram
             rep.SaveDiagram(d.DiagramID);
             foreach (EA.DiagramLink link in d.DiagramLinks)
             {
                 if (link.IsHidden == false)
                 {

                     // check if connector is connected with diagram object
                     EA.Connector c = rep.GetConnectorByID(link.ConnectorID);
                     foreach (EA.DiagramObject dObject in d.SelectedObjects)
                     {
                         if (c.ClientID == dObject.ElementID | c.SupplierID == dObject.ElementID)
                         {

                             SetLineStyleForDiagramLink(lineStyle, link);
                         }
                     }
                     if (selectedConnector != null)
                     {
                         if (c.ConnectorID == selectedConnector.ConnectorID)
                         {
                             SetLineStyleForDiagramLink(lineStyle, link);
                             continue;
                         }
                     }
                 }
             }
             rep.ReloadDiagram(d.DiagramID);
             if (selectedConnector != null) d.SelectedConnector = selectedConnector;
             foreach (EA.DiagramObject dObject in selectedObjects)
             {
                 //d.SelectedObjects.AddNew(el.ElementID.ToString(), el.Type);
                 d.SelectedObjects.AddNew(dObject.ElementID.ToString(), dObject.ObjectType.ToString());
             }
             //d.Update();
             d.SelectedObjects.Refresh();
         }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:55,代码来源:Util.cs


注:本文中的EA.SaveDiagram方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。