Stream(ArrayList data, CurtainGrid grid) { data.Add(new Snoop.Data.ClassSeparator(typeof(CurtainGrid))); data.Add(new Snoop.Data.Enumerable("Curtain Cells", grid.GetCurtainCells())); data.Add(new Snoop.Data.Enumerable("Mullions", grid.GetMullionIds(), m_activeDoc)); data.Add(new Snoop.Data.Enumerable("Unlocked mullions", grid.GetUnlockedMullionIds(), m_activeDoc)); data.Add(new Snoop.Data.Angle("Grid 1 angle", grid.Grid1Angle)); data.Add(new Snoop.Data.String("Grid 1 justification", grid.Grid1Justification.ToString())); data.Add(new Snoop.Data.Double("Grid 1 offset", grid.Grid1Offset)); data.Add(new Snoop.Data.Angle("Grid 2 angle", grid.Grid2Angle)); data.Add(new Snoop.Data.String("Grid 2 justification", grid.Grid2Justification.ToString())); data.Add(new Snoop.Data.Double("Grid 2 offset", grid.Grid2Offset)); data.Add(new Snoop.Data.Int("Number of panels", grid.NumPanels)); data.Add(new Snoop.Data.Enumerable("Panels", grid.GetPanelIds(), m_activeDoc)); data.Add(new Snoop.Data.Enumerable("Unlocked panels", grid.GetUnlockedPanelIds(), m_activeDoc)); data.Add(new Snoop.Data.Int("Number of U lines", grid.NumULines)); data.Add(new Snoop.Data.Enumerable("U grid lines", grid.GetUGridLineIds(), m_activeDoc)); data.Add(new Snoop.Data.Int("Number of V lines", grid.NumVLines)); data.Add(new Snoop.Data.Enumerable("V grid lines", grid.GetVGridLineIds(), m_activeDoc)); }
/// <summary> /// obtain all the properties of the curtain grid /// </summary> public void ReloadGridProperties() { if (null == m_activeGrid) { if (true == m_myDocument.WallCreated) { m_activeGrid = m_myDocument.CurtainWall.CurtainGrid; } else { return; } } // horizontal grid pattern Transaction act = new Transaction(m_activeDocument, Guid.NewGuid().GetHashCode().ToString()); act.Start(); switch (m_activeGrid.Grid2Justification) { case CurtainGridAlignType.Beginning: m_gridProperties.HorizontalJustification = CurtainGridAlign.Beginning; break; case CurtainGridAlignType.Center: m_gridProperties.HorizontalJustification = CurtainGridAlign.Center; break; case CurtainGridAlignType.End: m_gridProperties.HorizontalJustification = CurtainGridAlign.End; break; default: break; } m_gridProperties.HorizontalAngle = m_activeGrid.Grid2Angle * 180.0 / Math.PI; m_gridProperties.HorizontalOffset = m_activeGrid.Grid2Offset; m_gridProperties.HorizontalLinesNumber = m_activeGrid.NumULines; // vertical grid pattern switch (m_activeGrid.Grid1Justification) { case CurtainGridAlignType.Beginning: m_gridProperties.VerticalJustification = CurtainGridAlign.Beginning; break; case CurtainGridAlignType.Center: m_gridProperties.VerticalJustification = CurtainGridAlign.Center; break; case CurtainGridAlignType.End: m_gridProperties.VerticalJustification = CurtainGridAlign.End; break; default: break; } m_gridProperties.VerticalAngle = m_activeGrid.Grid1Angle * 180.0 / Math.PI; m_gridProperties.VerticalOffset = m_activeGrid.Grid1Offset; m_gridProperties.VerticalLinesNumber = m_activeGrid.NumVLines; // other data m_gridProperties.PanelNumber = m_activeGrid.NumPanels; m_gridProperties.UnlockedPanelsNumber = m_activeGrid.GetUnlockedPanelIds().Count; m_gridProperties.CellNumber = m_activeGrid.GetCurtainCells().Count; if (0 != m_activeGrid.GetMullionIds().Count) { m_gridProperties.MullionsNumber = m_activeGrid.GetMullionIds().Count; m_gridProperties.UnlockedmullionsNumber = m_activeGrid.GetUnlockedMullionIds().Count; } act.Commit(); }