コード例 #1
0
ファイル: Model.cs プロジェクト: dickiyamu/revit
 public DF.Model ToDragonfly()
 {
     return(new DF.Model(
                Identifier,
                Buildings.Select(x => x.ToDragonfly()).ToList(),
                Properties.ToDragonfly(),
                DisplayName,
                null, // user data
                null, // version
                ContextShades.Select(x => x.ToDragonfly()).ToList(),
                Units,
                Tolerance,
                AngleTolerance
                ));
 }
コード例 #2
0
ファイル: Model.cs プロジェクト: dickiyamu/revit
 public HB.Model ToHoneybee()
 {
     return(new HB.Model(
                Identifier,
                Properties.ToHoneybee(),
                DisplayName,
                null, // user data
                null, //version
                Rooms,
                null, // orphaned faces
                ContextShades.Select(x => x.ToHoneybee()).ToList(),
                null, // orphaned apertures
                null, // orphaned doors
                Units,
                Tolerance,
                AngleTolerance
                ));
 }
コード例 #3
0
        private string ProcessExport()
        {
            Debug.WriteLine(Thread.CurrentThread.ManagedThreadId);

            var selected = SpatialObjects.SourceCollection.Cast <SpatialObjectWrapper>()
                           .Where(x => x.IsSelected && !x.Messages.Any())
                           .Select(x => x.Room2D)
                           .ToList();

            if (selected.Any())
            {
                var modelPath = Model.SerializeRoom2D(selected, BldgProgramType, BldgConstructionSet, Dragonfly, ContextShades.ToList());
                return(modelPath);
            }

            return(null);
        }
コード例 #4
0
 private void OnAddPlanting()
 {
     Model.SelectPlanting(out var shadingIds).ForEach(x => ContextShades.Add(x));
     Settings.StoredSettings.EnergyModelSettings.Shades.AddRange(shadingIds);
 }
コード例 #5
0
 private void OnAddFaces()
 {
     Model.SelectFaces(out var faceIds).ForEach(x => ContextShades.Add(x));
     Settings.StoredSettings.EnergyModelSettings.Shades.AddRange(faceIds);
 }
コード例 #6
0
 private void OnClearShades()
 {
     ContextShades.Clear();
     Settings.StoredSettings.EnergyModelSettings.Shades.Clear();
 }