Доброго времени суток.
Уважаемые форумчане, помогите пожалуйста разобраться начинающему.
В студии компилируется без ошибки.[CommandMethod("GDBT")]
public Double GetDistanceBetweenTwoPoints()
{
Document acDoc = Application.DocumentManager.MdiActiveDocument;
PromptDoubleResult pDblRes;
pDblRes = acDoc.Editor.GetDistance ("\nPick two points: ");
string p =pDblRes.Value.ToString();
double pDBL = Math.Round(Double.Parse(p),1);
return pDBL;
}
В автокаде вылетает exception
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.
at System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo method, Boolean throwOnBindFailure)
at System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo method)
at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi, Object commandObject, Boolean bLispFunction)
at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo mi, Object commandObject, Boolean bLispFunction)
at Autodesk.AutoCAD.Runtime.CommandClass.CommandThunk.Invoke()
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Acdbmgd
Assembly Version: 19.1.0.0
Win32 Version: 19.1.108.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202014/AcdbMgd.DLL
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR