Physical_ID

 

       
            Document doc = Application.ActiveDocument;
            string FileName = @"C:\Stefano\CollectionObjects\Mark.rfa";
            string NomeTipo ="listello";
            FamilySymbol Tipo = null;
            if(!doc.LoadFamilySymbol(FileName,NomeTipo,out Tipo))
            {
                throw new Exception("problema");
            }
 
            double n = 20;
            for (double i = 0; i < n; i = i + 1)
            {
                double t = i / n;
                XYZ collocation = Application.Create.NewXYZ(0.0, 0.0, i );
                FamilyInstance inst = doc.Create.NewFamilyInstance(collocation, Tipo, StructuralType.NonStructural);
                Parameter param = inst.get_Parameter("tag");
                param.Set(i.ToString());
                Parameter lenght = inst.get_Parameter("lunghezzaListello");
                XYZ first = Application.Create.NewXYZ((lenght.AsDouble())*0.5, 0.0, i );
                XYZ second = Application.Create.NewXYZ((lenght.AsDouble())*0.5, 0.0, i + 10);
                Line axis = Application.Create.NewLineBound(first, second);
                bool rotate = inst.Location.Rotate(axis, t * Math.PI);
            }
Gruppo di lavoro:
StefanoGuarnieri



Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer