Beispiel #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            GH_String ghstr = new GH_String();

            if (DA.GetData(0, ref ghstr))
            {
                if (GH_Convert.ToString(ghstr, out string title, GH_Conversion.Both))
                {
                    Titles.SetJobNumber(title);
                }
            }

            ghstr = new GH_String();
            if (DA.GetData(1, ref ghstr))
            {
                if (GH_Convert.ToString(ghstr, out string title, GH_Conversion.Both))
                {
                    Titles.SetInitials(title);
                }
            }
            ghstr = new GH_String();
            if (DA.GetData(2, ref ghstr))
            {
                if (GH_Convert.ToString(ghstr, out string title, GH_Conversion.Both))
                {
                    Titles.SetTitle(title);
                }
            }
            ghstr = new GH_String();
            if (DA.GetData(3, ref ghstr))
            {
                if (GH_Convert.ToString(ghstr, out string title, GH_Conversion.Both))
                {
                    Titles.SetSubTitle(title);
                }
            }
            ghstr = new GH_String();
            if (DA.GetData(4, ref ghstr))
            {
                if (GH_Convert.ToString(ghstr, out string title, GH_Conversion.Both))
                {
                    Titles.SetCalculation(title);
                }
            }
            ghstr = new GH_String();
            if (DA.GetData(5, ref ghstr))
            {
                if (GH_Convert.ToString(ghstr, out string title, GH_Conversion.Both))
                {
                    Titles.SetNotes(title);
                }
            }

            List <string> titles = new List <string>
            {
                "Job Number: " + Titles.JobNumber,
                "Initials: " + Titles.Initials,
                "Title: " + Titles.Title,
                "Sub Title: " + Titles.SubTitle,
                "Calculation Header: " + Titles.Calculation,
                "Notes: " + Titles.Notes
            };

            DA.SetDataList(0, titles);
        }