/// <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(); }
public static void ThroughAssZoomAndSelectionHelperFunction() { // Core.no_handle_selection = true; // чтобы изменение выборки не обрабатывалось Core.current_editor.SetImpliedSelection(internal_saved_selection); AcMapMap.ForceScreenRefresh(); }
/// <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(); }
/// <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); }
public static bool IsCoordinateSystem(string coordinateSystemId) { return(AcMapMap.GetCurrentMap().GetCoordinateSystemId() == coordinateSystemId); }