CommandAliasList

public static class CommandAliasList
Contains static methods and properties to access command aliases.

Properties

Count

#Since v5.0
Returns the number of command alias in Rhino.
public static int Count { get; }

InstantAliasDelayMilliseconds

#Since v9.0
Timer delay to use before triggering instant aliases
public static int InstantAliasDelayMilliseconds { get; set; }

Methods

Add

#Since v5.0
Adds a new command alias to Rhino.
public static bool Add(
alias,
[in] The name of the command alias.
macro
[in] The command macro to run when the alias is executed.
)
true if successful.

Clear

#Since v5.0
Removes all aliases from the list.
public static void Clear()

Delete

#Since v5.0
Deletes an existing command alias from Rhino.
public static bool Delete(
alias
[in] The name of the command alias.
)
true if successful.

FindAlias

#Since v9.0
Find an existing CommandAlias given the alias string
public static CommandAlias FindAlias(
alias
)

GetAlias

#Since v9.0
Get command alias from the list
public static CommandAlias GetAlias(
index
)
null is index is out of range

GetDefaults

#Since v5.0
Constructs a dictionary containing as keys the default names and as value the default macro.

The returned dictionary contains a copy of the settings.

public static Dictionary<string, string> GetDefaults()
A new dictionary with the default name/macro combinations.

GetMacro

#Since v5.0
Returns the macro of a command alias.
public static string GetMacro(
alias
[in] The name of the command alias.
)

GetNames

#Since v5.0
Returns a list of command alias names.
public static string[] GetNames()
An array of strings. This can be empty.

IsAlias

#Since v5.0
Verifies that a command alias exists in Rhino.
public static bool IsAlias(
alias
[in] The name of the command alias.
)
true if the alias exists.

IsDefault

#Since v5.0
Computes a value indicating if the current alias list is the same as the default alias list.
public static bool IsDefault()
true if the current alias list is exactly equal to the default alias list; false otherwise.

SetMacro

#Since v5.0
Modifies the macro of a command alias.
public static bool SetMacro(
alias,
[in] The name of the command alias.
macro
[in] The new command macro to run when the alias is executed.
)
true if successful.

ToDictionary

#Since v5.0
Constructs a new dictionary that contains: as keys all names and as values all macros.

Modifications to this dictionary do not affect any Rhino command alias.

public static Dictionary<string, string> ToDictionary()
The new dictionary.

Update

#Since v9.0
Add or modify the command aliases with a list of aliases
public static void Update(
aliases,
replaceAll
)