/// <summary>
        /// this method had command before for drwing
        /// </summary>
        public void DrawConnectionPoint()
        {
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
            DrawConnectionPointJig DCP = new DrawConnectionPointJig();

            bool Conti = true;

            PromptResult pr;

            while (Conti)
            {
                pr = ed.Drag(DCP);

                if (pr.Status == PromptStatus.OK)
                {
                    Conti = false;

                    // time to draw

                    Entity entity = DCP.GetEntity();

                    Atend.Global.Acad.UAcad.DrawEntityOnScreen(entity, Atend.Control.Enum.AutoCadLayerName.GENERAL.ToString());

                    Atend.Base.Acad.AT_INFO at_info = new Atend.Base.Acad.AT_INFO();

                    at_info.ParentCode       = "";
                    at_info.NodeCode         = "";
                    at_info.NodeType         = (int)Atend.Control.Enum.ProductType.ConnectionPoint;
                    at_info.ProductCode      = 0;
                    at_info.SelectedObjectId = entity.ObjectId;
                    at_info.Insert();
                }
            }
        }
        public static ObjectId DrawConnectionPoint(Point3d CenterPoint, ObjectId ParentOI)
        {
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
            DrawConnectionPointJig DCP = new DrawConnectionPointJig();
            Entity   ent          = DCP.GetDemo(CenterPoint);
            ObjectId ConnectionOI = ObjectId.Null;

            if (ent != null)
            {
                ConnectionOI = Atend.Global.Acad.UAcad.DrawEntityOnScreen(ent, Atend.Control.Enum.AutoCadLayerName.GENERAL.ToString());


                Atend.Base.Acad.AT_INFO ParentInfo = Atend.Base.Acad.AT_INFO.SelectBySelectedObjectId(ParentOI);

                Atend.Base.Acad.AT_INFO at_info = new Atend.Base.Acad.AT_INFO(ConnectionOI);
                //ed.WriteMessage("ParentCode For connection Point: {0}\n", ParentInfo.NodeCode);
                at_info.ParentCode  = ParentInfo.NodeCode;
                at_info.NodeCode    = "";
                at_info.NodeType    = (int)Atend.Control.Enum.ProductType.ConnectionPoint;
                at_info.ProductCode = 0;
                at_info.Insert();

                Atend.Base.Acad.AT_SUB ConnectionPSub = new Atend.Base.Acad.AT_SUB(ConnectionOI);
                ConnectionPSub.SubIdCollection.Add(ParentOI);
                ConnectionPSub.Insert();

                Atend.Base.Acad.AT_SUB.AddToAT_SUB(ConnectionOI, ParentOI);
            }
            return(ConnectionOI);
        }