title: Create a New SubCategory LineStyle in Revit
body: <p>I have created code that gathers a list of the existing "Line Styles" in Revit.</p>
  
  <pre><code>List&lt;Category&gt; All_Categories = doc.Settings.Categories.Cast&lt;Category&gt;().ToList();
  Category Line_Category = All_Categories[1];
  foreach (Category one_cat in All_Categories) { if (one_cat.Name == "Lines") { Line_Category = one_cat;} }
  if (Line_Category.CanAddSubcategory)
  {
        CategoryNameMap All_Styles = Line_Category.SubCategories; List&lt;string&gt; Line_Styles = new List&lt;string&gt;();
        foreach (Category one_category in All_Styles) { if (one_category.Name.Contains("CO_NAME")) {Line_Styles.Add(one_category.Name); } }
                  TaskDialog.Show(Line_Styles.Count.ToString() + " Current Line Styles", List_To_Dialog(Line_Styles));
  }
  </code></pre>
  
  <p>This gets the list of line styles, but when I try:
  Category New_Line_Style = Line_Category.NewSubCategory....
  Visual Studio tells me there is no definition for NewSubCategory  </p>
  
  <p>Can anyone tell me how to make a new SubCategory of "Lines", or what I'm doing wrong in the above code? </p>
  
  <p>NOTE:  I discovered the main issue.  I was attempting to add the sub category to my variable Line_Category (which is itself a category, which should be a parent).  I had also attempted adding the sub category to All_Categories (which had been cast as a list and not a CategoryNameMap).</p>
  
  <p>When I added a variable that was not cast, NewSubCategory became available.  However, now I am unable to see how to set the line pattern associated with my new style -- the only example I've found online suggests using New_Line_Style.LinePatternId, but that is not in the list of available options on my new SubCategory.  Is there some way to set the default pattern to be used when creating a new SubCategory?</p>