/***************************************************/ /**** Private methods ****/ /***************************************************/ private List <Grid> ReadGrid(List <string> ids = null) { //Implement code for reading Grids List <Grid> bhomGrids = new List <Grid>(); // Get the gridsystems that are in the model IGridSystems IGridSystems = m_Model.GetGridSystems(); int numGridSystems = IGridSystems.GetCount(); // Get all elements on each GridSystem for (int i = 0; i < numGridSystems; i++) { //Look into a specific gridsystem IGridSystem myGridSystem = IGridSystems.GetAt(i); //get the amoount of gridlines that are in the system IModelGrids IModelGrids = myGridSystem.GetGrids(); int numGridLines = IModelGrids.GetCount(); // Loop through all gridlines in the GridSystem and add a bhomGrid for (int j = 0; j < numGridLines; j++) { IModelGrid IModelGrid = IModelGrids.GetAt(j); Grid bhomGrid = IModelGrid.ToBHoMObject(myGridSystem, j); bhomGrids.Add(bhomGrid); } } return(bhomGrids); }