コード例 #1
0
        public static CivilTinSurface FindSurfaceIdForPolylineV2(ObjectId oid)
        {
            try
            {
                foreach (KeyValuePair <ObjectId, string> id in m_polylinesonly)
                {
                    if (id.Key == null)
                    {
                        continue;
                    }

                    if (oid == id.Key)
                    {
                        Debug.WriteLine("Match iod" + oid + "and" + id.Key);
                        return(CivilTinSurface.CreateFromExisting(id.Value));
                    }
                    Debug.WriteLine("NO match iod" + oid + "and" + id.Key);
                }
            }
            catch (System.Exception e)
            {
                ACADLogging.LogMyExceptions("FindSurfaceIdForPolylineV2" + e.Message);
            }
            return(null);
        }
コード例 #2
0
        public CivilTinSurface FindSurfaceIdForPolylineV1(ObjectId oid)
        {
            try
            {
                foreach (KeyValuePair <ObjectId, string> id in m_polylinesurfaces)
                {
                    if (id.Key == null)
                    {
                        continue;
                    }

                    if (oid == id.Key)
                    {
                        Debug.WriteLine("Match iod" + oid + "and" + id.Key);
                        return(CivilTinSurface.CreateFromExisting(id.Value));
                    }
                    Debug.WriteLine("NO match iod" + oid + "and" + id.Key);
                }
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e);
            }
            return(null);
        }