internal override IntPtr _InternalGetConstPointer()
        {
#if RHINO_SDK
            if (m_doc != null)
            {
                IntPtr rc = UnsafeNativeMethods.CRhinoHatchPatternTable_GetHatchPatternPointer(m_doc.RuntimeSerialNumber, m_id);
                if (rc == IntPtr.Zero)
                {
                    throw new Runtime.DocumentCollectedException($"Could not find HatchPattern with ID {m_id}");
                }
                return(rc);
            }
#endif
            Pixel.Rhino.FileIO.File3dm parent_file = m__parent as Pixel.Rhino.FileIO.File3dm;
            if (parent_file != null)
            {
                IntPtr pModel = parent_file.NonConstPointer();
                return(UnsafeNativeMethods.ONX_Model_GetModelComponentPointer(pModel, m_id));
            }
            return(m_constptr_static);
        }
        internal override IntPtr _InternalGetConstPointer()
        {
#if RHINO_SDK
            if (m_doc != null)
            {
                var rc = UnsafeNativeMethods.CRhinoLinetypeTable_GetLinetypePointer2(m_doc.RuntimeSerialNumber, m_id);
                if (rc == IntPtr.Zero)
                {
                    throw new Runtime.DocumentCollectedException($"Could not find Linetype with ID {m_id}");
                }
                return(rc);
            }
#endif
            Pixel.Rhino.FileIO.File3dm file_parent = m__parent as Pixel.Rhino.FileIO.File3dm;
            if (file_parent != null)
            {
                IntPtr pModel = file_parent.NonConstPointer();
                return(UnsafeNativeMethods.ONX_Model_GetLinetypePointer(pModel, m_id));
            }

            return(IntPtr.Zero);
        }
 internal Linetype(Guid id, Pixel.Rhino.FileIO.File3dm onxModel)
 {
     m_id      = id;
     m__parent = onxModel;
 }
 internal HatchPattern(Guid id, Pixel.Rhino.FileIO.File3dm parent)
 {
     m_id      = id;
     m__parent = parent;
 }