Пример #1
0
 public static int[] GetIDs(this IVisio.Selection selection)
 {
     System.Array ids_sa;
     selection.GetIDs(out ids_sa);
     int[] ids = (int[])ids_sa;
     return(ids);
 }
Пример #2
0
    public void selectShpLayer(string layerName)
    {
        int i = 0;

        int[] lngRowIDs;
        Array lngRowIDArray;

        //this selects the shapes of the selected layer
        LayerSelection = acPage.CreateSelection(Microsoft.Office.Interop.Visio.VisSelectionTypes.visSelTypeByLayer, Microsoft.Office.Interop.Visio.VisSelectMode.visSelModeSkipSuper, layerName);
        LayerSelection.GetIDs(out lngRowIDArray);
        lngRowIDs = (int[])lngRowIDArray;
        for (i = 0; i < lngRowIDs.Length; i++)
        {
            Debug.Write("Object ID: " + lngRowIDs[i].ToString() + "\n");
        }
    }