Show / Hide Table of Contents

Class Common

Contains common methods used through the WisDOT namespace.

Namespace: WisDOT
Assembly: WisDOT.Extensions.dll

Methods

AngleToBearing(double, bool, int)

Convert angle to bearing

Declaration
public static string AngleToBearing(double angleDegrees, bool dms = false, int precision = 2)
Parameters
Type Name Description
double angleDegrees
bool dms
int precision
Returns
Type Description
string

ExplodeObject(Entity)

Explodes an entitity into a DBObjectColleciton

Declaration
public static DBObjectCollection ExplodeObject(Entity ent)
Parameters
Type Name Description
Entity ent
Returns
Type Description
DBObjectCollection

ExplodeObject(ObjectId)

Explodes an entitity into a DBObjectColleciton

Declaration
public static DBObjectCollection ExplodeObject(ObjectId oid)
Parameters
Type Name Description
ObjectId oid
Returns
Type Description
DBObjectCollection

GetHelpResources(string, bool, string)

Looks up a url, given a look-up key in the /en-US/HelpResources.csv.

Declaration
public static string GetHelpResources(string commandName, bool launch = true, string defaultUrl = "https://c3dkb.dot.wi.gov/Content/Default.htm")
Parameters
Type Name Description
string commandName

Look-up key to locate the url.

bool launch

Launch the url in the default application.

string defaultUrl

Default url if a match is not found.

Returns
Type Description
string

Url string.

GetPathForCurrentUser(string)

Returns a path from somone else's user profile for the current user.

Declaration
public static string GetPathForCurrentUser(string path)
Parameters
Type Name Description
string path
Returns
Type Description
string

OpenFileWithDefaultApp(string, bool, int)

Open a file in its default application

Declaration
public static void OpenFileWithDefaultApp(string path, bool waitForIdleInput = false, int milliseconds = 10000)
Parameters
Type Name Description
string path

path to file

bool waitForIdleInput
int milliseconds

OpenHyperlink()

open hyperlinks that are attached to various objects in AutoCAD without minimizing the AutoCAD session.

Declaration
public static void OpenHyperlink()
Remarks

https://c3dkb.dot.wi.gov/Content/c3d/wisdot-cstm/c3d-tab/dsn/dsn-misc-opn-hyprlnk.htm

TaskDialogAbortRetryIgnore(nint, string, string, string, TaskDialogIcon)

Wrapper on AutoCADS TaskDialog preset for Abort Retry or Ignore

Declaration
public static string TaskDialogAbortRetryIgnore(nint owner, string title, string mainInstruction, string contentText, TaskDialogIcon icon = 65535)
Parameters
Type Name Description
nint owner
string title
string mainInstruction
string contentText
TaskDialogIcon icon
Returns
Type Description
string

TryParseDouble(string, string, out double)

Parse double values out of an extended string that contains a variable

Declaration
public static bool TryParseDouble(string text, string varName, out double result)
Parameters
Type Name Description
string text

full string

string varName

variable to look for

double result

resulting double

Returns
Type Description
bool

Indicates success

WinMessageBox(string, string, string, string)

Opens a Windows message box.

Declaration
public static string WinMessageBox(string title, string message, string buttons, string icon)
Parameters
Type Name Description
string title

Message box title.

string message

Message box message.

string buttons

Button options: "OKCancel" "OK", "YesNo", "YesNoCancel"

string icon

Icon options: "Asterisk", "Error", "Exclamation", "Hand", "Information", "Question", "Stop", "Warning", "None"

Returns
Type Description
string

WriteLog(string, string, bool)

Streamwriter used for generating a log file

Declaration
public static void WriteLog(string logFile, string message, bool append = true)
Parameters
Type Name Description
string logFile
string message
bool append
In this article
Back to top Generated by DocFX