public void Create(Document doc) { FamilySymbol neocube = new FilteredElementCollector(doc).OfClass(typeof(FamilySymbol)).Where(q => q.Name == "cube").First() as FamilySymbol; if (!neocube.IsActive) { neocube.Activate(); } FamilyInstance unit = doc.Create.NewFamilyInstance(new XYZ(), neocube, StructuralType.NonStructural); unit.setP("g_pos", out_Pos); unit.setP("g_gost", out_Gost); unit.setP("g_name", out_Name); unit.setP("g_num", out_Kol_vo); unit.setP("g_mass", out_Mass); unit.setP("g_other", out_Other); unit.setP("g_group", out_Group); unit.setP("g_snos", out_Snos); //unit.LookupParameter("g_sort").Set(this.Prior).ToString(); unit.setP("g_sort", Prior.ToString()); }