Exemplo n.º 1
0
        protected override void TrySolveInstance(IGH_DataAccess DA)
        {
            // grab input family instance
            DB.FamilyInstance famInst = default;
            if (!DA.GetData("Family Instance", ref famInst))
            {
                return;
            }

            // grab input phase if provided
            DB.Phase phase = default;
            DA.GetData("Phase", ref phase);

            if (phase is null)
            {
                DA.SetData("FromRoom", famInst.FromRoom);
                DA.SetData("ToRoom", famInst.ToRoom);
                DA.SetData("Room", famInst.Room);
                DA.SetData("Space", famInst.Space);
            }
            else
            {
                DA.SetData("FromRoom", famInst.get_FromRoom(phase));
                DA.SetData("ToRoom", famInst.get_ToRoom(phase));
                DA.SetData("Room", famInst.get_Room(phase));
                DA.SetData("Space", famInst.get_Space(phase));
            }
        }