public static List <Entity> ToEntity(Geometry obj, Geometry denseObj, double defaultElevation, ObjectId blockDefId)
        {
            List <Entity> list = null;
            List <Entity> result;

            try
            {
                if (obj == null)
                {
                    result = null;
                }
                else
                {
                    PolygonN    polygonN    = obj as PolygonN;
                    PolylineN   polylineN   = obj as PolylineN;
                    PointN      pointN      = obj as PointN;
                    MultipointN multipointN = obj as MultipointN;
                    if (polygonN != null)
                    {
                        list = GIS2CAD.ToEntity(polygonN, denseObj as PolygonN, defaultElevation);
                    }
                    else if (polylineN != null)
                    {
                        list = GIS2CAD.ToEntity(polylineN, denseObj as PolylineN, defaultElevation);
                    }
                    else if (pointN != null)
                    {
                        list = GIS2CAD.ToEntity(pointN, defaultElevation, blockDefId);
                    }
                    else if (multipointN != null)
                    {
                        list = GIS2CAD.ToEntity(multipointN, defaultElevation);
                    }
                    else
                    {
                        DocUtil.ShowDebugMessage(AfaStrings.EncounteredUnknownObjectType);
                    }
                    if (list == null)
                    {
                        result = list;
                    }
                    else
                    {
                        result = list;
                    }
                }
            }
            catch
            {
                result = null;
            }
            return(result);
        }