Exemple #1
0
 public CivilTinSurface(string surfaceName, string surfaceStyleName)
 {
     using (Transaction tr = CivilApplicationManager.StartTransaction())
     {
         m_TheSurfaceId = C3DLandDb.TinSurface.Create(CivilApplicationManager.WorkingDatabase, surfaceName);
         C3DLandDb.TinSurface surface = m_TheSurfaceId.GetObject(OpenMode.ForWrite) as C3DLandDb.TinSurface;
         surface.Layer = surfaceStyleName;
         ObjectId styleId = SurfaceStyleManager.GetStyleId(surfaceStyleName);
         if (styleId == ObjectId.Null)
         {
             throw new CreateSurfaceException("Unable to create Surface object.");
         }
         surface.StyleId = styleId;
         tr.Commit();
     }
 }
Exemple #2
0
 public void AddPointCloudObjects()
 {
     using (Transaction tr = CivilApplicationManager.StartTransaction())
     {
         string surfaceName           = "";
         var    m_TheSurfaceId        = C3DLandDb.TinSurface.Create(CivilApplicationManager.WorkingDatabase, surfaceName);
         C3DLandDb.TinSurface surface = m_TheSurfaceId.GetObject(OpenMode.ForRead) as C3DLandDb.TinSurface;
         string   surfaceStyleName    = "";
         ObjectId styleId             = SurfaceStyleManager.GetStyleId(surfaceStyleName);
         if (styleId == ObjectId.Null)
         {
             throw new CreateSurfaceException("Unable to create Surface object.");
         }
         surface.StyleId = styleId;
         tr.Commit();
     }
 }