Example #1
0
        public IFCrelassignstask(String InputData, IList <IFCparser> source, int lineno)
        {
            try
            {
                dataparser o = new dataparser();
                string[]   tempstringarray;
                tempstringarray = InputData.Split(',');

                IFCobject       = source.Getobjectfromlineno(Int32.Parse(o.Getlinenodata(tempstringarray[4])));
                IFCobject.task  = new IFCtask(IFCobject.IFCdata, IFCobject.lineno);
                IFCtaskinstance = IFCobject.task;

                IFCobject = source.Getobjectfromlineno(Int32.Parse(o.Getlinenodata(tempstringarray[7])));
                IFCobject.scheduleTimeControl  = new IFCScheduleTimeControl(IFCobject.IFCdata, source, IFCobject.lineno);
                IfcScheduleTimeControlInstance = IFCobject.scheduleTimeControl;
                //foreach (var s in source)
                //{

                //    if (s.lineno == lineno)
                //        s.taskassignment = new IFCrelassignstask(IFCtaskinstance, IfcScheduleTimeControlInstance);
                //    else if (s.lineno == IFCtaskinstance.tasklinelineno )
                //        s.task = IFCtaskinstance;
                //    else if (s.lineno == IfcScheduleTimeControlInstance.scheduletimecontrollineno )
                //        s.scheduleTimeControl = IfcScheduleTimeControlInstance;
                //    else if (s.lineno == IfcScheduleTimeControlInstance.scheduledstartdate.dateandtimelineno)
                //        s.dateandtime = IfcScheduleTimeControlInstance.scheduledstartdate;
                //    else if (s.lineno == IfcScheduleTimeControlInstance.scheduledenddate.dateandtimelineno)
                //        s.dateandtime = IfcScheduleTimeControlInstance.scheduledenddate;
                //    else if (s.lineno == IfcScheduleTimeControlInstance.scheduledstartdate.date.datelineno )
                //        s.date = IfcScheduleTimeControlInstance.scheduledstartdate.date ;
                //    else if (s.lineno == IfcScheduleTimeControlInstance.scheduledenddate.date.datelineno)
                //        s.date = IfcScheduleTimeControlInstance.scheduledenddate.date;

                //    else
                //    {

                //    }

                //}
            }
            catch (Exception e)
            {
                Console.WriteLine("Failed to parse the IFCRELASSIGNS. {0}", e.ToString());
                throw;
            }
        }
Example #2
0
 public IFCDateAndTime(string inputdata, IList <IFCparser> source, int lineno)
 {
     try
     {
         dateandtimelineno = lineno;
         int        datelineno;
         dataparser o = new dataparser();
         string[]   tempstringarray;
         tempstringarray = inputdata.Split(',');
         datelineno      = Int32.Parse(o.Getlinenodata(tempstringarray[0]));
         ifcobject       = source.Getobjectfromlineno(datelineno);
         ifcobject.date  = new IFCdate(ifcobject.IFCdata, datelineno);
         date            = ifcobject.date;
     }
     catch (Exception e)
     {
         Console.WriteLine("Failed to parse IFCDateandTime. {0}", e.ToString());
         throw;
     }
 }
Example #3
0
 public IFCScheduleTimeControl(string inputdata, IList <IFCparser> source, int lineno)
 {
     try
     {
         scheduletimecontrollineno = lineno;
         dataparser o = new dataparser();
         string[]   tempstringarray;
         tempstringarray = inputdata.Split(',');
         //   scheduledstartdate = Int32.Parse(o.Getlinenodata(tempstringarray[8]));
         IFCobject             = source.Getobjectfromlineno(Int32.Parse(o.Getlinenodata(tempstringarray[8])));
         IFCobject.dateandtime = new IFCDateAndTime(IFCobject.IFCdata, source, IFCobject.lineno);
         scheduledstartdate    = IFCobject.dateandtime;
         IFCobject             = source.Getobjectfromlineno(Int32.Parse(o.Getlinenodata(tempstringarray[12])));
         IFCobject.dateandtime = new IFCDateAndTime(IFCobject.IFCdata, source, IFCobject.lineno);
         scheduledenddate      = IFCobject.dateandtime;
     }
     catch (Exception e)
     {
         Console.WriteLine("Failed to parse IFCScheduletimecontrol. {0}", e.ToString());
         throw;
     }
 }