linux arm关闭光栅,ObjectARX 关闭光栅图片的边框

// second parameter is 0 for current database.

AcDbRasterVariables * pRasterVariables = AcDbRasterVariables::openRasterVariables(AcDb::kForWrite, 0);

pRasterVariables->setImageFrame(AcDbRasterVariables::FrameSettings::kImageFrameOff);

pRasterVariables->close();

This is frustrating. I can read raster varaibles just fine but any attempt to

change them crashes AutoCAD. Would you mind taking a look at this? acdbCurDb()

is a function I wrote to return the database of the active document.

lockdocument() locks the active document using the kAutoWrite parameter.

The get_ImageFrame works perfectly. The put_ImageFrame crashes AutoCAD without

fail. What am I doing wrong?

STDMETHODIMP CAcadRasterVariables::get_ImageFrame(vbxFrameSettings *pVal)

{

HRESULT hReturn = S_OK;

AcDbRasterVariables* pImageVars =

AcDbRasterVariables::openRasterVariables(AcDb::kForRead, acdbCurDb());

*pVal = (vbxFrameSettings)pImageVars->imageFrame();

return hReturn;

}

STDMETHODIMP CAcadRasterVariables::put_ImageFrame(vbxFrameSettings newVal)

{

HRESULT hReturn = S_OK;

if (lockDocument() != Acad::eOk)

hReturn = ReportError("Could not lock document.", E_ACCESSDENIED);

{

AcDbRasterVariables* pImageVars =

AcDbRasterVariables::openRasterVariables(AcDb::kForWrite, acdbCurDb());

if(pImageVars->setImageFrame((AcDbRasterVariables::FrameSettings)newVal) !=

Acad::eOk)

hReturn = ReportError("Could not change frame property.", E_FAIL);

}

return hReturn;

}

http://www.acadx.com

Win a free autographed copy of

"AutoCAD 2000 VBA Programmer's Reference"

输入imageframe命令,将参数值改为0;

adb964b9d32b07810a8a722a8bbde5a3.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值