zoukankan      html  css  js  c++  java
  • EPLAN API 入门系列 提高篇(How to Add/Remove GraphicalLayer?)

    Add GraphicalLayer:

     1  GraphicalLayer oGpl = null;
     2  GraphicalLayerTable layerTable = oPage.Project.LayerTable;
     3 
     4  if (oGpl == null)
     5   {
     6     oGpl = new GraphicalLayer();
     7     MultiLangString description = new MultiLangString();
     8     description.AddString(ISOCode.Language.L___, "Graphic.General");
     9     oGpl.Pen.ColorId = 1;
    10     oGpl.Create(layerTable, "Epl" + cnt.ToString(), description);
    11    }
    12  
    13    foreach (GraphicalLayer layer2 in layerTable.Layers)
    14    {
    15      if (layer2.Name == "Epl0" || layer2.Name == "Epl1")
    16      {
    17        oGpl = layer2;
    18        if (!oGpl.isVisible)
    19        {
    20          oGpl.isVisible = true;
    21        }
    22        oGpl.Pen.ColorId = 1;
    23        oGpl.Store();
    24      }
    25     }

    Remove GraphicalLayer:

     1   GraphicalLayer layer = null;
     2   GraphicalLayerTable layerTable = currentProject.LayerTable;
     3   GraphicalLayer[] layers = layerTable.Layers;
     4   for (int num = 0; num < layers.Length; num++)
     5   {
     6     GraphicalLayer layer2 = layers[num];
     7     if (layer2.Name == "Epl0" || layer2.Name == "Epl1")
     8     {
     9        layerTable.RemoveLayer(layers[num]);
    10     }
    11   }
  • 相关阅读:
    DNS bind9安装
    DHCP服务器
    RAID
    LVM
    box-pack
    display:flex和display:box布局浏览器兼容性分析
    Flex布局
    几种常见的浏览器以及内核
    display 垂直居中
    font-family 定义的最后为什么要加一句sans-serif
  • 原文地址:https://www.cnblogs.com/AriLee/p/2978614.html
Copyright © 2011-2022 走看看