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); }