How to create a category programatically

Unofficial Content

  
              KBCategory yourCategory = new KBCategory(model);
              yourCategory.Name = "This Is a Category";

              // If you want to show your category in the model tree
              yourCategory.ShowInModelTree = true;

              // Save to KB
              yourCategory.Save();