Exemple #1
0
 public static void PopulateDCLineSegmentProperties(DCLineSegment cimDCLineSegment, ResourceDescription rd)
 {
     if ((cimDCLineSegment != null) && (rd != null))
     {
         IES21Converter.PopulateConductorProperties(cimDCLineSegment, rd);
     }
 }
Exemple #2
0
        private ResourceDescription CreateDCLineSegmentResourceDescription(DCLineSegment dcline)
        {
            ResourceDescription rd = null;

            if (dcline != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.DCLINESEGMENT, importHelper.CheckOutIndexForDMSType(DMSType.DCLINESEGMENT));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(dcline.ID, gid);

                ////populate ResourceDescription
                PowerTransformerConverter.PopulateDCLineSegmentProperties(dcline, rd, importHelper, report);
            }
            return(rd);
        }
 public static void PopulateDCLineSegmentProperties(DCLineSegment dcline, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((dcline != null) && (rd != null))
     {
         PowerTransformerConverter.PopulateConductorProperties(dcline, rd, importHelper, report);
         if (dcline.DcSegmentInductanceHasValue)
         {
             rd.AddProperty(new Property(ModelCode.DCLINESEGMENT_INDUTANCE, dcline.DcSegmentInductance));
         }
         if (dcline.DcSegmentResistanceHasValue)
         {
             rd.AddProperty(new Property(ModelCode.DCLINESEGMENT_RESISTANCE, dcline.DcSegmentResistance));
         }
     }
 }
        private ResourceDescription CreateDCLineSegmentResourceDescription(DCLineSegment cimDCLineSegment)
        {
            ResourceDescription rd = null;

            if (cimDCLineSegment != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.DCLINESEG, importHelper.CheckOutIndexForDMSType(DMSType.DCLINESEG));
                rd = new ResourceDescription(gid);

                importHelper.DefineIDMapping(cimDCLineSegment.ID, gid);

                IES21Converter.PopulateDCLineSegmentProperties(cimDCLineSegment, rd);
            }
            return(rd);
        }
        private void ImportDCLineSegments()
        {
            SortedDictionary <string, object> cimDCLineSegments = concreteModel.GetAllObjectsOfType("FTN.DCLineSegment");

            if (cimDCLineSegments != null)
            {
                foreach (KeyValuePair <string, object> cimDCLineSegmentPair in cimDCLineSegments)
                {
                    DCLineSegment cimDCLineSegment = cimDCLineSegmentPair.Value as DCLineSegment;

                    ResourceDescription rd = CreateDCLineSegmentResourceDescription(cimDCLineSegment);
                    if (rd != null)
                    {
                        delta.AddDeltaOperation(DeltaOpType.Insert, rd, true);
                        report.Report.Append("DCLineSegment ID = ").Append(cimDCLineSegment.ID).Append(" SUCCESSFULLY converted to GID = ").AppendLine(rd.Id.ToString());
                    }
                    else
                    {
                        report.Report.Append("DCLineSegment ID = ").Append(cimDCLineSegment.ID).AppendLine(" FAILED to be converted");
                    }
                }
                report.Report.AppendLine();
            }
        }
Exemple #6
0
 public static void PopulateDCLineSegmentProperties(DCLineSegment cimDCLineSegment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     PowerTransformerConverter.PopulateConductorProperties(cimDCLineSegment, rd, importHelper, report);
 }