Ejemplo n.º 1
0
Archivo: Ldr.cs Proyecto: 15831944/EM
        drawLdr(Point3d pnt3d, double txtSize, string nameLayer, short color)
        {
            ObjectId           idLdr  = ObjectId.Null;
            bool               Stop   = false;
            bool               escape = false;
            PromptStatus       ps;
            ObjectIdCollection ids    = new ObjectIdCollection();
            Point3dCollection  pnts3d = new Point3dCollection();

            pnts3d.Add(pnt3d);

            int k = 0;

            do
            {
                k     = pnts3d.Count;
                pnt3d = UserInput.getPoint("\nPick Next Vertex: ", pnts3d[k - 1], out escape, out ps, osMode: 0);
                if (ps == PromptStatus.Cancel)
                {
                    ids.delete();
                    return(ObjectId.Null);
                }

                if (ps == PromptStatus.None)
                {
                    switch (ids.Count)
                    {
                    case 0:
                        return(ObjectId.Null);

                    default:
                        Stop  = true;
                        idLdr = Draw.addLdr(pnts3d, false, nameLayer: "ARROW");
                        ids.delete();
                        break;
                    }
                }
                else
                {
                    ids.Add(Draw.addLine(pnts3d[k - 1], pnt3d));
                    pnts3d.Add(pnt3d);
                }
            }while (!Stop);
            return(idLdr);
        }
Ejemplo n.º 2
0
        makeBreakline(string nameApp, string nameCmd, out ObjectId idPoly,
                      List <ObjectId> idCogoPnts = null, string pntDesc = "CPNT-ON", List <Point3d> pnts3dL = null)
        {
            idPoly = ObjectId.Null;

            Point3d pnt3dBase = Pub.pnt3dO;
            Point3d pnt3dTemp = Pub.pnt3dO;

            Point3dCollection pnts3d = new Point3dCollection();

            ObjectId idPoly3d = ObjectId.Null;
            ObjectId idCgPnt  = ObjectId.Null;

            string prompt    = string.Empty;
            string nameLayer = string.Empty;

            List <ObjectId> idLines = new List <ObjectId>();
            bool            escape  = false;
            PromptStatus    ps;

            try
            {
                if (idCogoPnts == null)
                {
                    idCogoPnts = new List <ObjectId>();

                    bool exitLoop = false;
                    do
                    {
                        int pntCount = idCogoPnts.Count;
                        switch (pntCount)
                        {
                        case 0:
                            prompt = "\nSelect begin point:";
                            break;

                        default:
                            prompt    = "\nSelect point:";
                            pnt3dTemp = pnt3dBase;
                            break;
                        }

                        if (nameCmd == "cmdBV")
                        {
                            string resElev = "";
                            resElev = UserInput.getCogoPoint("\nSelect Begin Point: ", out idCgPnt, Pub.pnt3dO, osMode: 8);
                            if (idCgPnt == ObjectId.Null)
                            {
                                return(ObjectId.Null);
                            }

                            idCogoPnts.Add(idCgPnt);
                            Point3d pnt3d1 = idCgPnt.getCogoPntCoordinates();

                            resElev = UserInput.getCogoPoint("\nSelect End Point: ", out idCgPnt, pnt3d1, osMode: 8);
                            if (idCgPnt == ObjectId.Null)
                            {
                                return(ObjectId.Null);
                            }

                            idCogoPnts.Add(idCgPnt);
                            pntDesc  = cleanPntDesc(idCgPnt.getCogoPntDesc());
                            exitLoop = true;
                        }
                        else
                        {
                            pnt3dBase = UserInput.getPoint(prompt, pnt3dTemp, out escape, out ps, osMode: 8);

                            if (!escape && pnt3dBase != Pub.pnt3dO)
                            {
                                pnts3d.Add(pnt3dBase);
                                BaseObjs._db.forEachMS <CogoPoint>(cg =>
                                {
                                    if (cg.Location == pnt3dBase)
                                    {
                                        idCgPnt = cg.ObjectId;
                                    }
                                });

                                if (idCgPnt == ObjectId.Null)
                                {
                                    if (pntCount < 2)
                                    {
                                        return(ObjectId.Null);
                                    }
                                    else
                                    {
                                        exitLoop = true;
                                    }
                                }
                                else
                                {
                                    idCogoPnts.Add(idCgPnt);
                                    pntCount = idCogoPnts.Count;
                                    pntDesc  = cleanPntDesc(idCgPnt.getCogoPntDesc());
                                    if (pntCount > 1)
                                    {
                                        if (nameCmd == "cmdMBL" || nameCmd == "cmdGBM")
                                        {
                                            ObjectId idLine = Base_Tools45.Draw.addLine(pnt3dTemp, pnt3dBase);
                                            idLines.Add(idLine);
                                        }
                                    }

                                    if (nameCmd != "cmdMBL" && nameCmd != "cmdGBM")
                                    {
                                        if (pntCount == 2)
                                        {
                                            exitLoop = true;
                                        }
                                    }
                                }
                            }
                            else
                            {
                                if (pntCount < 2)
                                {
                                    return(ObjectId.Null);
                                }
                                else
                                {
                                    exitLoop = true;
                                    if (nameCmd == "cmdMBL" || nameCmd == "cmdGBM")
                                    {
                                        Misc.deleteObjs(idLines);
                                    }
                                }
                            }
                        }
                    }while (exitLoop == false);
                }
                else//----------CogoPoints passed to method - need to determine Description based on first point-----------------
                {
                    var pg = from data in CgPnt_Group.pntGroups       //Linq
                             where data.name == pntDesc
                             select data;

                    if (pg != null)
                    {
                        pntDesc = cleanPntDesc(idCogoPnts[0].getCogoPntDesc());
                    }
                }

                //------------------------------------determine layer name-------------------------------------------------

                if (pntDesc == "CPNT-ON")
                {
                    nameLayer = "CPNT-BRKLINE";
                }
                else
                {
                    var pg = from data in CgPnt_Group.pntGroups
                             where data.name == pntDesc
                             select data;

                    if (pg != null)
                    {
                        pntDesc = cleanPntDesc(pntDesc);
                    }
                    nameLayer = string.Format("{0}-BRKLINE", pntDesc);
                }

                //-------------------------------------------------------------------------------------------------------------

                Layer.manageLayers(nameLayer);

                //-------------------------------------------------------------------------------------------------------------

                if (nameCmd != "cmdMBL" && nameCmd != "cmdABC" && nameCmd != "cmdABG")
                {
                    switch (nameCmd)
                    {
                    case "cmdBV":
                    case "cmdFL":
                        idPoly = idCogoPnts.addPoly("FL");
                        break;

                    case "cmdGB":
                        idPoly = idCogoPnts.addPoly("GB");
                        break;

                    case "cmdGBM":
                        for (int i = 1; i < idCogoPnts.Count; i++)
                        {
                            List <ObjectId> idCgPnts = new List <ObjectId>()
                            {
                                idCogoPnts[i - 1], idCogoPnts[i]
                            };
                            idPoly = idCgPnts.addPoly("GB");
                        }
                        break;

                    case "cmdRF":
                        idPoly = idCogoPnts.addPoly("GUTTER");      //cmdBV edge of gutter as reference
                        break;
                    }

                    using (BaseObjs._acadDoc.LockDocument())
                    {
                        idPoly3d = idCogoPnts.addPoly3d(nameLayer);
                        Layer.manageLayer(nameLayer, 171, false, false);
                    }

                    xData.lnkPntsAndPoly3d(idPoly3d, idCogoPnts[0], idCogoPnts[1], nameApp);        //adds poly3d to each cogo point and both points to poly3d
                }
                else if (nameCmd == "cmdMBL" || nameCmd == "cmdGBM")
                {
                    idPoly3d = pnts3d.addPoly3d(nameLayer);
                    Layer.manageLayer(nameLayer, 171, false, false);

                    bool isClosed = idPoly3d.checkIfClosed3d(false);
                    if (isClosed)
                    {
                        idCogoPnts.RemoveAt(idCogoPnts.Count - 1);
                    }

                    for (int i = 0; i < idCogoPnts.Count; i++)
                    {
                        idCogoPnts[i].updatePntXData(idPoly3d, nameApp);
                    }

                    TypedValue[] TVs = new TypedValue[idCogoPnts.Count + 1];
                    TVs.SetValue(new TypedValue(1001, apps.lnkBrks), 0);
                    for (int i = 0; i < idCogoPnts.Count; i++)
                    {
                        TVs.SetValue(new TypedValue(1005, idCogoPnts[i].getHandle()), i + 1);
                    }
                    idPoly3d.setXData(TVs, apps.lnkBrks);
                }
                else if (nameCmd == "cmdABC" || nameCmd == "cmdABG")
                {
                    idPoly3d = pnts3dL.addPoly3d(nameLayer);
                    Layer.manageLayer(nameLayer, 171, false, false);

                    if (nameApp == apps.lnkBrks2)
                    {
                        for (int i = 0; i < idCogoPnts.Count; i++)
                        {
                            idCogoPnts[i].updatePntXData(idPoly3d, nameApp);
                        }
                    }

                    //TypedValue[] TVs = new TypedValue[idCogoPnts.Count + 1];
                    //TVs.SetValue(new TypedValue(1001, nameApp), 0);
                    //for (int i = 0; i < idCogoPnts.Count; i++)
                    //{
                    //    TVs.SetValue(new TypedValue(1005, idCogoPnts[i].getHandle()), i + 1);
                    //}
                    //idPoly3d.setXData(TVs, nameApp);
                }
            }
            catch (System.Exception ex)
            {
                BaseObjs.writeDebug(ex.Message + " BrkLine.cs: line: 254");
            }
            return(idPoly3d);
        }
Ejemplo n.º 3
0
        getCogoPoint(string prompt1, out ObjectId idCgPnt, ObjectId idCgPntBase, int osMode)
        {
            Object   mode      = SnapMode.getOSnap();
            string   elev      = string.Empty;
            ObjectId idCogoPnt = ObjectId.Null;

            idCgPnt = ObjectId.Null;

            Point3d pnt3dBase = Pub.pnt3dO;
            Point3d pnt3dX    = Pub.pnt3dO;

            if (idCgPntBase != ObjectId.Null)
            {
                pnt3dBase = idCgPntBase.getCogoPntCoordinates();
            }

            bool         escape;
            PromptStatus ps;

            try
            {
                if (pnt3dBase != Pub.pnt3dO)
                {
                    pnt3dX = UserInput.getPoint(prompt1, pnt3dBase, out escape, out ps, osMode);
                }
                else
                {
                    pnt3dX = UserInput.getPoint(prompt1, out ps, osMode);
                }

                if (pnt3dX == Pub.pnt3dO)
                {
                    return(elev);
                }

                ObjectIdCollection ids = new ObjectIdCollection();
                BaseObjs._db.forEachMS <CogoPoint>(cg =>
                {
                    if (cg.Location == pnt3dX)
                    {
                        idCogoPnt = cg.ObjectId;
                        ids.Add(idCogoPnt);
                    }
                });

                switch (ids.Count)
                {
                case 0:
                    break;

                case 1:
                    elev    = string.Format("{0:F2}", idCogoPnt.getCogoPntElevation());
                    idCgPnt = idCogoPnt;
                    break;

                case 2:
                    Application.ShowAlertDialog("Multiple CogoPoints at same location. Exiting...");
                    break;
                }
            }
            catch (System.Exception ex)
            {
                BaseObjs.writeDebug(ex.Message + " UserInput.cs: line: 384");
            }
            finally
            {
                SnapMode.setOSnap((int)mode);
            }

            return(elev);
        }
Ejemplo n.º 4
0
        getDockLimits(int intNumDocks)
        {
            bool     exists          = false;
            ObjectId idDictGRADEDOCK = Dict.getNamedDictionary("GRADEDOCK", out exists);
            ObjectId idDictX         = default(ObjectId);

            if ((idDictGRADEDOCK == ObjectId.Null))
            {
                Autodesk.AutoCAD.ApplicationServices.Core.Application.ShowAlertDialog("GRADEDOCK dictionary missing - run AVG");
            }
            Point3d pnt3dPick;

            Entity ent = Select.selectEntity(typeof(Polyline3d), "\nSelect Finish Floor 3d Polyline: ",
                                             "3d Polyline selection failed.  Exiting...", out pnt3dPick);

            Polyline3d poly3d = (Polyline3d)ent;

            ResultBuffer rb = poly3d.ObjectId.getXData("AVG");

            if (rb == null)
            {
                return;
            }
            TypedValue[] tvs = rb.AsArray();

            bldgNum = tvs[2].Value.ToString();

            ObjectId idDictBLDG = Dict.getSubDict(idDictGRADEDOCK, bldgNum);

            ObjectId idDictDOCKS = Dict.getSubEntry(idDictBLDG, "DOCKS");

            if (idDictDOCKS == ObjectId.Null)
            {
                idDictDOCKS = Dict.addSubDict(idDictBLDG, "DOCKS");
            }

            using (BaseObjs._acadDoc.LockDocument())
            {
                Object selectCycling = Application.GetSystemVariable("SELECTIONCYCLING");
                Application.SetSystemVariable("SELECTIONCYCLING", 0);
                PromptStatus ps;
                try
                {
                    for (int i = 1; i < intNumDocks + 1; i++)
                    {
                        idDictX = Dict.addSubDict(idDictDOCKS, i.ToString(CultureInfo.InvariantCulture));

                        bool    escape   = false;
                        Point3d pnt3dRet = UserInput.getPoint(string.Format("\nSelect Dock {0} : Begin point (CCW orientation)", i), Pub.pnt3dO, out escape, out ps, osMode: 0);
                        BaseObjs.write("\n");

                        TypedValue[] TVs = new TypedValue[] {
                            new TypedValue(1040, pnt3dRet.X),
                            new TypedValue(1040, pnt3dRet.Y),
                            new TypedValue(1040, pnt3dRet.Z)
                        };

                        Dict.addXRec(idDictX, "BEG", TVs);

                        pnt3dRet = UserInput.getPoint(string.Format("\nSelect Dock {0} : End point (CCW orientation)", i), pnt3dRet, out escape, out ps, osMode: 0);
                        BaseObjs.write("\n");

                        TVs = new TypedValue[] {
                            new TypedValue(1040, pnt3dRet.X),
                            new TypedValue(1040, pnt3dRet.Y),
                            new TypedValue(1040, pnt3dRet.Z)
                        };

                        Dict.addXRec(idDictX, "END", TVs);
                    }
                }
                catch (System.Exception ex)
                {
                    BaseObjs.writeDebug(ex.Message + " Grading_Dock.cs: line: 85");
                }
                finally
                {
                    Application.SetSystemVariable("SELECTIONCYCLING", selectCycling);
                }
            }
        }
Ejemplo n.º 5
0
        addLdrText(string nameCmd, string nameApp, ObjectId idLdr, List <ObjectId> idsCgPnts, string top = "", string bot = "", string bot2 = "",
                   double deltaZ = 0.0, double xFactor = 0.8, bool useBackgroundFill = false, List <Point3d> pnts3dX = null)
        {
            string resultTop  = top.ToUpper();
            string resultBot  = bot.ToUpper();
            string resultBot2 = bot2.ToUpper();

            Point3d pnt3dTop = Pub.pnt3dO;
            Point3d pnt3dBot = Pub.pnt3dO;

            Point3d pnt3dLdrMid = Pub.pnt3dO;
            Point3d pnt3dLdrIns = Pub.pnt3dO;       //text insertion point on Ldr before offset
            Point3d pnt3dLdrEnd = Pub.pnt3dO;

            Point3d pnt3d1 = Pub.pnt3dO;
            Point3d pnt3d2 = Pub.pnt3dO;

            ObjectId idTxTop  = ObjectId.Null; //text
            ObjectId idTxBot  = ObjectId.Null;
            ObjectId idTxBot2 = ObjectId.Null;

            double         angle     = 0.0;
            double         scale     = Misc.getCurrAnnoScale();
            double         gapTop    = 0.09;
            double         gapBot    = 0.09;
            List <Point3d> pnts3dLdr = new List <Point3d>();

            int n = 0;
            //Application.ShowAlertDialog(idLDR.IsErased.ToString() + idLDR.IsEffectivelyErased.ToString() + idLDR.ToString());
            PromptStatus ps = PromptStatus.Cancel;

            if (nameCmd == "cmdFFD")
            {
                pnt3d1 = UserInput.getPoint("Pick Insertion Point for Label: ", out ps, osMode: 0);
                //Line line = LdrText_JigLine.jigLine(pnt3d1);
                //angle = line.Angle;
                //line.ObjectId.delete();
                angle = (double)Application.GetSystemVariable("VIEWTWIST");
            }
            else
            {
                if (idLdr.IsEffectivelyErased || idLdr.IsErased)
                {
                    return;
                }

                pnts3dLdr   = idLdr.getCoordinates3dList();
                n           = pnts3dLdr.Count;
                angle       = pnts3dLdr[n - 2].getDirection(pnts3dLdr[n - 1]); //angle opposite direction arrow is pointing for GS or direction of 2nd segment of leader if 3 points
                pnt3dLdrEnd = pnts3dLdr[n - 1];
            }

            double angleTx = 0;

            AttachmentPoint apTop;
            AttachmentPoint apBot;
            string          justifyTop = string.Empty;
            string          justifyBot = string.Empty;

            bool left_justify = Base_Tools45.Math.left_Justify(angle);

            if (left_justify)
            {
                apTop      = AttachmentPoint.BottomLeft;
                apBot      = AttachmentPoint.TopLeft;
                angleTx    = angle + pi;
                justifyTop = Pub.JUSTIFYLEFT;
                justifyBot = Pub.JUSTIFYLEFT;
            }
            else
            {
                apTop      = AttachmentPoint.BottomRight;
                apBot      = AttachmentPoint.TopRight;
                angleTx    = angle;
                justifyTop = Pub.JUSTIFYRIGHT;
                justifyBot = Pub.JUSTIFYRIGHT;
            }

            if (cmdsGS.Contains(nameCmd))
            { // overrides for GS commands
                apTop      = AttachmentPoint.BottomCenter;
                justifyTop = Pub.JUSTIFYCENTER;
            }

            if (nameCmd == "cmdFFD")
            {
                apTop      = AttachmentPoint.MiddleCenter;
                justifyTop = Pub.JUSTIFYCENTER;
            }

            if (nameCmd == "cmdDEP")
            {
                justifyTop = Pub.JUSTIFYCENTER;
            }
            if (bot.Length < 4)
            {
                justifyBot = Pub.JUSTIFYCENTER;
            }

            double widthTop = 0;
            double widthBot = 0;
            double station  = 0.0;
            double offset   = 0.0;

            Txt.setAnnoStyle();

            Color color = Misc.getColorByLayer();

            switch (nameCmd)
            {
            case "cmdFFD":
                string txtTop = string.Format("{0}{1}{2}", resultTop, @"\P", resultBot);
                idTxTop = Txt.addMText(txtTop, pnt3d1, angleTx, 0.0, 0.50, apTop, "Annotative", "GRADES", color, justifyTop, AnnotativeStates.True, 0.8, true, backgroundFill: useBackgroundFill);
                station = 0.0;
                offset  = 0.0;
                return;

            case "cmdGS3":
                pnt3dLdrMid = idLdr.getBegPnt().getMidPoint2d(idLdr.getEndPnt());
                pnt3dLdrIns = pnt3dLdrMid.traverse(angle, (0.09 * scale / 2.4));
                if (left_justify)
                {
                    pnt3dTop = pnt3dLdrIns.traverse(angle - pi / 2, (gapTop * scale / 5));
                }
                else
                {
                    pnt3dLdrIns = pnt3dLdrMid.traverse(angle, (0.09 * scale / 2.4));
                    pnt3dTop    = pnt3dLdrIns.traverse(angle + pi / 2, (gapTop * scale / 5));
                }
                idTxTop = Txt.addMText(top, pnt3dTop, angleTx, 0.0, 0.085, apTop, "Annotative", "GRADES", color, justifyTop, AnnotativeStates.True, 0.7, backgroundFill: useBackgroundFill);
                Geom.getStaOff(idsCgPnts, pnt3dLdrIns, ref station, ref offset);
                pnts3dLdr = new List <Point3d> {
                    idLdr.getBegPnt(),
                        idLdr.getEndPnt(),
                        pnt3dLdrIns
                };
                break;

            case "cmdGS":
            case "cmdGS0":
            case "cmdGSE":
            case "cmdGSS":
            case "cmdGSX":
            case "cmdSL":
            case "cmdSS":
                if (nameCmd == "cmdGSX")
                {
                    gapTop = 0.01;
                }
                else
                {
                    gapTop = 0.09;
                }
                pnt3dLdrMid = idLdr.getBegPnt().getMidPoint2d(idLdr.getEndPnt());
                pnt3dLdrIns = pnt3dLdrMid.traverse(angle, (0.09 * scale / 2.4));
                if (left_justify)
                {
                    pnt3dTop = pnt3dLdrIns.traverse(angle - pi / 2, (gapTop * scale / 4));
                }
                else
                {
                    pnt3dTop = pnt3dLdrIns.traverse(angle + pi / 2, (gapTop * scale / 4));
                }
                idTxTop = Txt.addMText(top, pnt3dTop, angleTx, 0.0, 0.09, apTop, "Annotative", "GRADES", color, justifyTop, backgroundFill: useBackgroundFill);

                Geom.getStaOff(idsCgPnts, pnt3dLdrIns, ref station, ref offset);
                pnts3dLdr = new List <Point3d> {
                    idLdr.getBegPnt(),
                        idLdr.getEndPnt(),
                        pnt3dLdrIns                //pnt3dM - on ldr opposite text insertion point
                };
                break;

            default:
                idTxTop  = Txt.addMText(resultTop, pnt3dLdrEnd, angleTx, 0.0, 0.09, apTop, "Annotative", "GRADES", color, justifyTop, backgroundFill: useBackgroundFill);
                widthTop = idTxTop.getMTextWidth();
                if (resultBot != string.Empty)
                {
                    idTxBot = Txt.addMText(resultBot, pnt3dLdrEnd, angleTx, 0.0, 0.09, apBot, "Annotative", "GRADES", color, justifyBot, backgroundFill: useBackgroundFill);
                }
                if (resultBot2 != string.Empty)
                {
                    pnt3dBot = pnt3dLdrEnd.traverse(angleTx - pi / 2, (.14 * scale));
                    idTxBot2 = Txt.addMText(resultBot2, pnt3dBot, angleTx, 0.0, 0.09, apBot, "Annotative", "GRADES", color, justifyBot, backgroundFill: useBackgroundFill);
                }
                station = 0.0;
                offset  = 0.0;
                break;
            }
            if (resultBot == string.Empty || nameCmd == "cmdFFD")
            {
                widthBot = 0;
            }
            else
            {
                widthBot = idTxBot.getMTextWidth();
            }

            double width = 0;

            if (widthBot > widthTop)
            {
                width = widthBot;
            }
            else
            {
                width = widthTop;
            }

            //Adjust callout leader length
            if (!cmdsGS.Contains(nameCmd))
            {
                if (nameCmd == "cmdFLX" || nameCmd == "cmdGX")
                {
                    gapTop = 0.01;
                    gapBot = 0.08;
                }
                else
                {
                    gapTop = 0.09;
                    gapBot = 0.09;
                }

                Point3d pnt3dLdrEndAdj = pnts3dLdr[n - 2].traverse(angle, width);  //reseting leader endpoint based on text width

                idLdr.adjLdrEndPnt(pnt3dLdrEndAdj);
                pnts3dLdr = idLdr.getCoordinates3dList();

                if (left_justify)
                {
                    pnt3dTop = pnt3dLdrEndAdj.traverse(angle - pi / 2, gapTop * scale / 4);
                    pnt3dBot = pnt3dLdrEndAdj.traverse(angle + pi / 2, gapBot * scale / 4);
                }
                else
                {
                    pnt3dTop = pnt3dLdrEndAdj.traverse(angle + pi / 2, gapTop * scale / 4);
                    pnt3dBot = pnt3dLdrEndAdj.traverse(angle - pi / 2, gapBot * scale / 4);
                }

                idTxTop.adjMTextXYandAngle(pnt3dTop, angleTx, width);
                if (idTxBot != ObjectId.Null)
                {
                    idTxBot.adjMTextXYandAngle(pnt3dBot, angleTx, width);
                }
                if (idTxBot2 != ObjectId.Null)
                {
                    if (left_justify)
                    {
                        pnt3dBot = pnt3dLdrEndAdj.traverse(angle + pi / 2, 0.14 * scale);
                    }
                    else
                    {
                        pnt3dBot = pnt3dLdrEndAdj.traverse(angle - pi / 2, 0.14 * scale);
                    }

                    idTxBot2.adjMTextXYandAngle(pnt3dBot, angleTx, width);
                }
            }

            idLdr.moveToTop();

            //Add XData
            if (nameCmd != "cmdRDR" && nameCmd != "cmdSW")
            {
                if (idTxTop.IsValid)
                {
                    addXDataLnks(nameApp, nameCmd, idLdr, idTxTop, idTxBot, idTxBot2, pnt3dTop, scale, deltaZ, pnts3dLdr, idsCgPnts, station, offset, pnts3dX);
                }
                else
                {
                    return;
                }
                //addMTextIdToAppDict(nameApp, idTxTop);
            }
        }