public class Utils
{
// Fields
private static readonly Dictionary<string, GCHandle> modreq(IsByValue) m_cmdCallbacks;
// Methods
static Utils();
public Utils();
public static void ActivateDocument(IntPtr hWndDoc);
public static void AddCommand(string cmdGroupName, string cmdGlobalName, string cmdLocalName, CommandFlags cmdFlags, CommandCallback func);
public static string AngleToString(double dValue);
public static string ApplyAcValueFormat(object objValue, string formatString);
[return: MarshalAs(UnmanagedType.U1)]
public static bool AreFilesSame(string file1, string file2);
public static string CallButtonEditor(string resId, string packageName);
public static string CallButtonEditorWithBitmap(Bitmap bitmap, string resId, string packageName);
[return: MarshalAs(UnmanagedType.U1)]
public static bool CancelAndRunCmds(string pStrCmd);
public static unsafe void ConvertCMenuToMenuItem(CMenu* pMenu, MenuItem menuItem);
public static unsafe void ConvertToolBarsMapToMenuItem(map<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >,std::multimap<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >,ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >,std::less<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > >,std::allocator<std::pair<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > const ,ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > > > >,std::less<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > >,std::allocator<std::pair<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > const ,std::multimap<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >,ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >,std::less<ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > >,std::allocator<std::pair<ATL::CStringa0a7709f* modopt(IsImplicitlyDereferenced) toolBarsNameInGroup, MenuItem menuItem);
public static void CUIEndTransferBitmaps();
[return: MarshalAs(UnmanagedType.U1)]
public static bool CUIIsUsingSmallIcon();
public static void CUIRequestBitmap(string resId);
public static void CUISaveMenuAndToolbarState();
public static void CUIStartTransferBitmaps();
[return: MarshalAs(UnmanagedType.U1)]
public static bool DeleteDimConstraints(Database db, [MarshalAs(UnmanagedType.U1)] bool bKeepAnnotativeDimensions);
[return: MarshalAs(UnmanagedType.U1)]
public static bool DisableUndoRecording(Database db, [MarshalAs(UnmanagedType.U1)] bool bDisable);
public static void Do_Cmd(string menuString, [MarshalAs(UnmanagedType.U1)] bool IsSSetNeedRestore, [MarshalAs(UnmanagedType.U1)] bool bMenuMacro, [MarshalAs(UnmanagedType.U1)] bool IsHiddenCmd, [MarshalAs(UnmanagedType.U1)] bool bSynchronous);
public static IntPtr DrawLineTypePattern(ObjectId ltypeID, int left, int top, int right, int bottom);
public static IntPtr DrawLineWeightLine(LineWeight lineWeight, int left, int top, int right, int bottom);
public static IntPtr DrawLineWeightSquare(LineWeight lineWeight, int left, int top, int right, int bottom);
public static void EnableDockControlBars([MarshalAs(UnmanagedType.U1)] bool bEnable);
public static void EnableFloatingWindows([MarshalAs(UnmanagedType.U1)] bool bEnable);
public static void EnableSysButtons([MarshalAs(UnmanagedType.U1)] bool bEnable);
public static ObjectId EntFirst();
public static ObjectId EntLast();
public static ObjectId EntNext(ObjectId entId);
public static ObjectId EntNext(ObjectId entId, [MarshalAs(UnmanagedType.U1)] bool skipSubEnt);
[return: MarshalAs(UnmanagedType.U1)]
public static bool EvaluateTopLevelNetwork(Database db, [MarshalAs(UnmanagedType.U1)] bool bRelaxEvaluate);
public static void ExecuteApplicationStatusBarMenu(int nId);
public static void FlushGraphics();
public static IntPtr GetAcadFrameHandle();
public static Icon GetAcadResourceIcon(string sResId);
public static IntPtr GetApplicationFrameHWnd();
public static string GetCommandAtLevelForDocument(int level);
public static int GetCommandVersion();
public static string GetCurrentFindingContent();
public static Color GetCurrentObjectColor();
public static ObjectId GetCurrentViewportVisualStyleId();
public static IntPtr GetCustomSwatchImage(string name, int nWidth, int nHeight);
public static string GetDieselEvalString(string text);
public static string GetDieselEvalString(string text, ref bool bGrayed, ref bool bChecked);
public static Icon GetDwgFrameIcon(Document doc);
public static IntPtr GetFontImage(ObjectId fontID);
public static string GetGradientDisplayText(string gradientName);
public static string GetGradientName(string displayText);
public static IntPtr GetGradientSwatchImage(string displayText, double angle, [MarshalAs(UnmanagedType.U1)] bool bShifted, Color startColor, Color stopColor, int nWidth, int nHeight);
[return: MarshalAs(UnmanagedType.U1)]
public static bool GetHideWarningDialogs(uint nType);
public static List<string> GetLastCommandLines(int lastLines, [MarshalAs(UnmanagedType.U1)] bool ignoreNull);
[return: MarshalAs(UnmanagedType.U1)]
public static bool GetMoreHideWarningDialogs(uint nType);
public static IntPtr GetOpmWindow();
public static IntPtr GetPatSwatchImage(string name, Color patternColor, Color backgroundColor, int nWidth, int nHeight);
public static IntPtr GetQpWindow();
public static IntPtr GetRealHatchPreviewImage(int nWidth, int nHeight);
public static ObservableCollection<string> GetRedoHistory();
public static string GetRefEditName();
public static Point2d GetTextExtents(ObjectId styleId, string text, double dHeight);
[return: MarshalAs(UnmanagedType.U1)]
public static bool GetToolPaletteGroups(string schemeName, out StringCollection pGroups);
public static ObservableCollection<string> GetUndoHistory();
public static double GetUnitsConversion(UnitsValue fromUnits, UnitsValue toUnits);
public static IntPtr GetUnknownPatternSwatchImage(int nWidth, int nHeight);
public static IntPtr GetUserDefinedSwatchImage([MarshalAs(UnmanagedType.U1)] bool bDouble, Color patternColor, Color backgroundColor, int nWidth, int nHeight);
public static Color GetVisualStyleEdgeColor(ValueType modopt(ObjectId) modopt(IsBoxed) visualStyleId);
public static IntPtr GetVisualStyleImage(ObjectId objectId);
public static Color GetVisualStyleIntersectionEdgeColor(ValueType modopt(ObjectId) modopt(IsBoxed) visualStyleId);
public static Color GetVisualStyleObscuredEdgeColor(ValueType modopt(ObjectId) modopt(IsBoxed) visualStyleId);
public static void GetVisualStyles(ObjectIdCollection objectIds, List<ImageSource> imageList);
public static void GraphScr();
[return: MarshalAs(UnmanagedType.U1)]
public static bool HistoryStatus();
public static string IconFilePath();
[return: MarshalAs(UnmanagedType.U1)]
public static bool InitDialog([MarshalAs(UnmanagedType.U1)] bool bUseDialog);
public static DialogResult InvokeDataLinkManagerDialog(Database database, int dialogMode, Form parentForm, out ObjectId objectId);
public static DialogResult InvokeDataTypeDialog(DataType inDataType, UnitType inUnitType, string sFormatIn, object objValue, int dialogOptions, Form parentForm, string sTitle, string sHelp, out DataType outDataType, out UnitType outUnitType, out string sFormatOut);
public static OPMStatus InvokeOpmSetPropertyValue([In, MarshalAs(UnmanagedType.IUnknown)] object prop, [In, MarshalAs(UnmanagedType.Struct)] object val, ObjectIdCollection objIds, Guid guid, OPMModeFlags mode);
public static void InvokeOptionsDialog(string strPos, [MarshalAs(UnmanagedType.U1)] bool bInvokedAsChildDlg, uint defaultLabelIdInFileTab, [MarshalAs(UnmanagedType.U1)] bool bExpanded);
public static void InvokeTableStyleDialog();
[return: MarshalAs(UnmanagedType.U1)]
public static bool Is3dVisualStyle(string styleName);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsCommandActive(string name);
public static CommandTypeFlags IsCommandNameInUse(string name);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsCommandReEntered(string name);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsCoreCommand(string name);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsDiesel(string text);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsDocumentInBlockEditor(Document doc);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsFlagOn(uint id, [MarshalAs(UnmanagedType.U1)] bool bDefault);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsInBlockEditor();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsInCommandStack(CommandFlags flags);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsInCustomizeMode();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsInPaperSpace();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsInputPending();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsInTilemode();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsLinkedObjectExist(Document doc);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsLispCommandDefined(string name);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsMultiRedoAvaliable();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsOEM();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsOverrideActive();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsPointOverToolbar(int x, int y);
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsTextEditorActive();
[return: MarshalAs(UnmanagedType.U1)]
public static bool IsUndoAvailable();
public static string NumberToUnitsString(double dValue);
public static void Orbit();
public static void Pan();
[return: MarshalAs(UnmanagedType.U1)]
public static bool PointOnScreen(Point3d pt);
public static void PostCommandPrompt();
public static void RegisterLispCommand(string cmdName, string lispName);
public static void ReloadMenus(string wsCurrentStr, [MarshalAs(UnmanagedType.U1)] bool bResetWorkspace, [MarshalAs(UnmanagedType.U1)] bool bIncrementalReloading);
public static void RemoveCommand(string cmdGroupName, string cmdGlobalName);
public static void RestoreApplicationStatusBar();
public static void RunFindText(string pStrCmd);
[return: MarshalAs(UnmanagedType.U1)]
public static bool SelectObjects(ObjectId[] ids);
public static void SendMenuStringToExecute(Document doc, string menuString, [MarshalAs(UnmanagedType.U1)] bool bEchoString);
public static void SetApplicationStatusBarProgressMeter(int nPos);
public static void SetApplicationStatusBarProgressMeter(string str, int minimum, int maximum);
public static void SetCurrentViewportVisualStyle(ObjectId visualStyleId);
[return: MarshalAs(UnmanagedType.U1)]
public static bool SetCurrentWorkspace(string wsCurrent, [MarshalAs(UnmanagedType.U1)] bool bRestoreUI, [MarshalAs(UnmanagedType.U1)] bool bAutoSaveWS);
public static void SetFocusToDwgView();
public static void SetHideWarningDialogs(uint nType, [MarshalAs(UnmanagedType.U1)] bool bValue);
public static void SetMoreHideWarningDialogs(uint nType, [MarshalAs(UnmanagedType.U1)] bool bValue);
public static void SetPropertiesInDatabaseForTPPlayback(Guid itemId, [MarshalAs(UnmanagedType.U1)] bool bSet);
public static void SetQnewTemplateAfterInitialSetup();
public static void SetQuickViewWindowHandle(IntPtr hWnd);
public static void SetRecoverAllMode([MarshalAs(UnmanagedType.U1)] bool bOn);
public static void SetRecoverRequestedMode([MarshalAs(UnmanagedType.U1)] bool bOn);
[return: MarshalAs(UnmanagedType.U1)]
public static bool SetUndoMark([MarshalAs(UnmanagedType.U1)] bool begin);
[return: MarshalAs(UnmanagedType.U1)]
public static bool SetUndoRequiresRegen(Database db);
public static void ShowHideTextWindow([MarshalAs(UnmanagedType.U1)] bool bShow);
public static void ShowLineTypeDialog();
public static MeshConversionType ShowMeshConversionTaskDialog();
[return: MarshalAs(UnmanagedType.U1)]
public static bool StartToolbarDragDrop(StringCollection menuGroups, StringCollection names, StringCollection tags, StringCollection commands, StringCollection helpStrs, StringCollection smallImages, StringCollection largeImages, StringCollection resourceFiles);
[return: MarshalAs(UnmanagedType.U1)]
public static bool StringToAngle(string sText, ref double dValue);
public static void TextScr();
public static void TransferBitmap(string resId);
public static void TransferToolbarBitmaps();
public static Point3d UcsToDisplay(Point3d ucsPoint, [MarshalAs(UnmanagedType.U1)] bool bPaperSpace);
[return: MarshalAs(UnmanagedType.U1)]
public static bool UnitsStringToNumber(string sText, ref double dValue);
[return: MarshalAs(UnmanagedType.U1)]
public static bool ViewHasChanged();
public static void ViewportChange(int x, int y);
public static void ViewportCycle();
public static void ViewportTypeChange(int id);
public static ObjectId visualStyleId(string visualStyleName);
public static string visualStyleName(ObjectId id);
public static void VpMaxCommand();
public static void VpMinCommand();
[return: MarshalAs(UnmanagedType.U1)]
public static bool WcMatch(string str, string pattern);
[return: MarshalAs(UnmanagedType.U1)]
public static bool WcMatchEx(string str, string pattern, [MarshalAs(UnmanagedType.U1)] bool ignoreCase);
public static void WriteToCommandLine(string message);
[return: MarshalAs(UnmanagedType.U1)]
public static bool WriteUndoBoundary(Database db, UndoBoundaryEnum boundary, string name);
public static void Zoom();
public static void ZoomAuto(short type, double a1, double a2, double a3, double a4);
public static void ZoomObjects([MarshalAs(UnmanagedType.U1)] bool use3d);
// Properties
public static MenuItem ApplicationStatusBarMenu { get; }
public static MenuItem ApplicationToolbarsMenu { get; }
public static bool CaptureOnLayoutSwitch { [param: MarshalAs(UnmanagedType.U1)] set; }
public static bool ImpliedSelectionIsActive { [return: MarshalAs(UnmanagedType.U1)] get; }
public static bool IsCuiCommandEnabled { [return: MarshalAs(UnmanagedType.U1)] get; }
public static bool IsEditorReady { [return: MarshalAs(UnmanagedType.U1)] get; }
public static bool IsOsThemed { [return: MarshalAs(UnmanagedType.U1)] get; }
public static string SysVarInProgress { get; }
// Nested Types
public enum MeshConversionType
{
ConvertToFacetedASM = 0x3eb,
ConvertToSmoothASM = 0x3ea,
FilterMeshObjects = 0x3e9,
UserBreak = 2
}
}