Example #1
0
        public static Dictionary <string, object> NodeCoordinates(object GsaFile, string sList)
        {
            ComAuto GsaObj = GsaFile as ComAuto;

            int[] NodeRefs = null;

            short s = GsaObj.EntitiesInList(sList, GsaEntity.NODE, out NodeRefs);

            Array.Sort(NodeRefs);

            List <Point> PtList = new List <Point>();


            GsaNode[] Nodes;


            //Get node coordinates
            short t = GsaObj.Nodes(NodeRefs, out Nodes);

            foreach (GsaNode item in Nodes)
            {
                PtList.Add(Point.ByCoordinates(item.Coor[0], item.Coor[1], item.Coor[2]));
            }

            return(new Dictionary <string, object>
            {
//
                { "Nodes.Coordinates", PtList as List <Point> },
                { "Node.Refs", NodeRefs as int[] }
            });
        }
Example #2
0
        public static Dictionary <string, object> NodesFromRefs(object GsaFile, int[] NodeRefs)
        {
            ComAuto GsaObj = GsaFile as ComAuto;

            List <Point> PtList = new List <Point>();


            GsaNode[] Nodes;


            //Get node coordinates
            short t = GsaObj.Nodes(NodeRefs, out Nodes);

            foreach (GsaNode item in Nodes)
            {
                PtList.Add(Point.ByCoordinates(item.Coor[0], item.Coor[1], item.Coor[2]));
            }

            return(new Dictionary <string, object>
            {
                { "Node.Refs", NodeRefs as int[] },
                { "Nodes.Coordinates", PtList as List <Point> }
            });
        }