private ResourceDescription CreatePerLengthPhaseImpedanceResourceDescription(FTN.PerLengthPhaseImpedance cimPerLengthPhaseImpedance)
        {
            ResourceDescription rd = null;

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

                ////populate ResourceDescription
                PowerTransformerConverter.PopulatePerLengthPhaseImpedanceProperties(cimPerLengthPhaseImpedance, rd, importHelper, report);
            }
            return(rd);
        }
        private void ImportPerLengthPhaseImpedances()
        {
            SortedDictionary <string, object> cimPerLengthPhaseImpedances = concreteModel.GetAllObjectsOfType("FTN.PerLengthPhaseImpedance");

            if (cimPerLengthPhaseImpedances != null)
            {
                foreach (KeyValuePair <string, object> cimPerLengthPhaseImpedancePair in cimPerLengthPhaseImpedances)
                {
                    FTN.PerLengthPhaseImpedance cimPerLengthPhaseImpedance = cimPerLengthPhaseImpedancePair.Value as FTN.PerLengthPhaseImpedance;

                    ResourceDescription rd = CreatePerLengthPhaseImpedanceResourceDescription(cimPerLengthPhaseImpedance);
                    if (rd != null)
                    {
                        delta.AddDeltaOperation(DeltaOpType.Insert, rd, true);
                        report.Report.Append("PerLengthPhaseImpedance ID = ").Append(cimPerLengthPhaseImpedance.ID).Append(" SUCCESSFULLY converted to GID = ").AppendLine(rd.Id.ToString());
                    }
                    else
                    {
                        report.Report.Append("PerLengthPhaseImpedance ID = ").Append(cimPerLengthPhaseImpedance.ID).AppendLine(" FAILED to be converted");
                    }
                }
                report.Report.AppendLine();
            }
        }