/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Rhino.DocObjects.Tables.DimStyleTable TB = Rhino.RhinoDoc.ActiveDoc.DimStyles; List <String> StyleIds = TB.Select(item => item.Name).ToList(); DA.SetDataList(0, StyleIds); }
private DimensionStyle GetStyle(string StyleName) { Rhino.DocObjects.Tables.DimStyleTable Tables = Rhino.RhinoDoc.ActiveDoc.DimStyles; DimensionStyle Style = Tables.FindName(StyleName); if (Style == null) { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, string.Format("Dimension Name {0} is not found, use current Style Instead", StyleName)); return(RhinoDoc.ActiveDoc.DimStyles.Current); } else { return(Style); } }