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[] } }); }
public static Dictionary <string, object> GetGsaNodeNumbers(ComAutoClass GsaObj, string List) { ComAuto GsaFile = GsaObj as ComAuto; int[] NodeRefs = null; short s = GsaFile.EntitiesInList(List, GsaEntity.NODE, out NodeRefs); //short s = GsaObj.EntitiesInList(List, GsaEntity.NODE, out NodeRefs); Array.Sort(NodeRefs); return(new Dictionary <string, object> { { "Node Refs", NodeRefs } }); }
public static Dictionary <string, object> Elements(object GsaFile, string sList) { ComAuto GsaObj = GsaFile as ComAuto; int[] EleRefs = null; short s = GsaObj.EntitiesInList(sList, GsaEntity.ELEMENT, out EleRefs); Array.Sort(EleRefs); List <int[]> Pts = new List <int[]>(); List <int> Properties = new List <int>(); List <int> Names = new List <int>(); // List<Point> StPoint = new List<Point>(); // List<Point> EndPoint = new List<Point>(); GsaElement[] GsaElements; //Get node coordinates short t = GsaObj.Elements(EleRefs, out GsaElements); foreach (GsaElement item in GsaElements) { Pts.Add(item.Topo); Properties.Add(item.Property); Names.Add(item.eType); } return(new Dictionary <string, object> { { "Elements.Refs", EleRefs as int[] }, { "Elements.EndPoints", Pts as List <int[]> }, { "Elements.Properties", Properties as List <int> }, { "Elements.Names", Names as List <int> } }); }