System.Runtime.InteropServices.COMException on IView_DG.SetBoolAttribute()
Posted: Mon May 17, 2021 4:59 pm
IView_DG.SetBoolAttribute() causes an exception for
ViewBoolAttribute_DG.eViewBoolAttributeDgEnablePan
ViewBoolAttribute_DG.eViewBoolAttributeDgEnableZoom
ViewBoolAttribute_DG.eViewBoolAttributeDgEnableRotate
System.Runtime.InteropServices.COMException
HResult=0x8002000F
Message=Parameter not optional. (Exception from HRESULT: 0x8002000F (DISP_E_PARAMNOTOPTIONAL))
Source=Interop.KernCADnet
StackTrace:
at KernCADnet.IView_DG.SetBoolAttribute(ViewBoolAttribute_DG attribute, Boolean val)
ViewBoolAttribute_DG.eViewBoolAttributeDgEnablePan
ViewBoolAttribute_DG.eViewBoolAttributeDgEnableZoom
ViewBoolAttribute_DG.eViewBoolAttributeDgEnableRotate
Code: Select all
var frontView = axKernCADnetFront.GetView() as IView_DG;
if (frontView != null)
{
frontView.SetBoolAttribute(ViewBoolAttribute_DG.eViewBoolAttributeDgEnablePan, enable);
frontView.SetBoolAttribute(ViewBoolAttribute_DG.eViewBoolAttributeDgEnableZoom, enable);
frontView.SetBoolAttribute(ViewBoolAttribute_DG.eViewBoolAttributeDgEnableRotate, enable);
}
HResult=0x8002000F
Message=Parameter not optional. (Exception from HRESULT: 0x8002000F (DISP_E_PARAMNOTOPTIONAL))
Source=Interop.KernCADnet
StackTrace:
at KernCADnet.IView_DG.SetBoolAttribute(ViewBoolAttribute_DG attribute, Boolean val)