Пример #1
0
        public void ProduceProfile(ref Document doc, ref List <string> vs, ref List <string> pv)
        {
            using (Transaction t = new Transaction(doc, "make profile xn * yn"))
            {
                t.Start();
                FamilyManager familyManager = doc.FamilyManager;

                for (int i = 0; i != vs.Count; i++)
                {
                    FamilyParameter familyParameter = familyManager.get_Parameter(vs[i]);
                    try
                    {
                        familyManager.SetValueString(familyParameter, pv[i]);
                    }
                    catch
                    {
                        familyManager.Set(familyParameter, int.Parse(pv[i]));
                    }
                }


                t.Commit();
            }
        }