private bool CategoryCheck(CC_Category cat)
        {
            Category    famcat   = currentDoc.OwnerFamily.FamilyCategory;
            CC_Category ccfamcat = RevitCategories.getCC_Category(famcat);

            if (ccfamcat.Children.Contains(cat.Name) || cat.Parent == ccfamcat.Name)
            {
                return(true);
            }
            return(false);
        }
 private static void setCategoryStyles(Category cat, CC_Category cccat)
 {
     if (cccat.CutLineweight > 0)
     {
         cat.SetLineWeight(cccat.CutLineweight, GraphicsStyleType.Cut);
     }
     if (cccat.ProjLineweight > 0)
     {
         cat.SetLineWeight(cccat.ProjLineweight, GraphicsStyleType.Projection);
     }
     cat.LineColor = new Color(cccat.Color[0], cccat.Color[1], cccat.Color[2]);
     cat.Material  = null;
 }
 private void CategorySetup(CC_Category cat)
 {
     if (cat.BuiltInCategory > 0)
     {
         Category bic = GetBuiltInCategory(currentDoc, cat.BuiltInCategory);
         setCategoryStyles(bic, cat);
     }
     else
     {
         CC_Category     parentcat = CategoryCalls.getCategory(cat.Name);
         Category        parent    = GetBuiltInCategory(currentDoc, parentcat.BuiltInCategory);
         CategoryNameMap map       = parent.SubCategories;
         if (!map.Contains(cat.Name))
         {
             Category subcat = currentDoc.Settings.Categories.NewSubcategory(parent, cat.Name);
             setCategoryStyles(subcat, cat);
         }
         else
         {
             Category subcat = map.get_Item(cat.Name);
             setCategoryStyles(subcat, cat);
         }
     }
 }