Ejemplo n.º 1
0
        /// <summary>Очистка выборки</summary>
        internal static void ClearImpliedSelection()
        {
            MgSelectionBase sel_base    = new MgSelectionBase(AcMapMap.GetCurrentMap());
            SelectionSet    new_sel_set = AcMapFeatureEntityService.AddFeaturesToSelectionSet(null, sel_base);

            Core.current_editor.SetImpliedSelection(new_sel_set);
            AcMapMap.ForceScreenRefresh();
        }
Ejemplo n.º 2
0
        public static void ThroughAssZoomAndSelectionHelperFunction()
        {
            //

            Core.no_handle_selection = true;             // чтобы изменение выборки не обрабатывалось

            Core.current_editor.SetImpliedSelection(internal_saved_selection);
            AcMapMap.ForceScreenRefresh();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Установка активной выборки без зумирования.
        /// </summary>
        /// <param name="sel_base"></param>
        internal static void SetImpliedSelectionBySelectionBase(MgSelectionBase sel_base)
        {
            Core.no_handle_selection = true;                                                                // чтобы изменение выборки не обрабатывалось

            internal_saved_selection = AcMapFeatureEntityService.AddFeaturesToSelectionSet(null, sel_base); // преобразование в SelectionSet

            Core.current_editor.SetImpliedSelection(internal_saved_selection);
            AcMapMap.ForceScreenRefresh();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// References the current AutoCAD Map Project drawing and returns the WKText for the current coordinate system (if set)
        /// </summary>
        /// <returns></returns>
        public static string GetWKTextCS()
        {
            string wktextcs = String.Empty;

            //_logger.Debug("Start GetWKTextCS");
            try
            {
                string mapcscode = GetMapCSCode();
                if (!String.IsNullOrEmpty(mapcscode))
                {
                    AcMapMap MapProject = AcMapMap.GetCurrentMap();
                    wktextcs = MapProject.GetMapSRS();
                }
            }
            catch (System.Exception ex)
            {
                //_logger.Error("Error in GetWKTextCS", ex);
                throw;
            }
            //_logger.Debug("End GetWKTextCS");
            return(wktextcs);
        }
Ejemplo n.º 5
0
 public static bool IsCoordinateSystem(string coordinateSystemId)
 {
     return(AcMapMap.GetCurrentMap().GetCoordinateSystemId() == coordinateSystemId);
 }