29 lines
574 B
C#
29 lines
574 B
C#
using System.Reflection;
|
|
|
|
namespace ShrlAlgoToolkit.Revit.Assists;
|
|
|
|
public class EncryptParameters
|
|
{
|
|
public static bool InvokeModule(string mName, object[] parameters, bool apiModule = true)
|
|
{
|
|
try
|
|
{
|
|
MethodInfo m;
|
|
|
|
if (apiModule)
|
|
|
|
m = NativeModule.GetApiModuleMethod(mName);
|
|
else
|
|
|
|
m = NativeModule.GetUiModuleMethod(mName);
|
|
|
|
m.Invoke(null, parameters);
|
|
|
|
return true;
|
|
}
|
|
catch (Exception)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
} |