[ARX]请问高手,插入块时怎么改变块比例??
请问高手,插入块时怎么改变块比例??下面是我插入块的程序,要加比例,怎么做谢谢!!!AcDbDatabase *pCurDb;<BR> AcDbBlockTable *pBlkTable;<BR> AcDbBlockTableRecord *pBlkTableRecord;<BR> AcDbBlockReference *pInsrtObj;<BR> AcDbObjectId blkId;<BR> pCurDb = acdbHostApplicationServices()->workingDatabase();
pCurDb->getBlockTable(pBlkTable, AcDb::kForRead);<BR> if(!pBlkTable->has(blkName))<BR> {<BR> acutPrintf("\nBlock definition %s not found. ", blkName);<BR> pBlkTable->close();<BR> return;<BR> }<BR><BR> pBlkTable->getAt(blkName, blkId);
pBlkTable->getAt(ACDB_MODEL_SPACE, pBlkTableRecord, AcDb::kForWrite);<BR> pBlkTable->close();<BR>
pInsrtObj = new AcDbBlockReference(insPt, blkId);
pBlkTableRecord->appendAcDbEntity(blkId, pInsrtObj);
pBlkTableRecord->close();<BR> pInsrtObj->close(); 参考:
AcDbBlockReference *blkRef = (AcDbBlockReference*)pEnt;<BR> if (blkRef) {<BR> double sfx = blkRef->scaleFactors().sx;<BR> double sfy = blkRef->scaleFactors().sy;<BR> double sfz = blkRef->scaleFactors().sz;<BR> blkRef-><b>setScaleFactors</b>(AcGeScale3d(sfx*sf, sfy*sf, sfz));<BR> }
页:
[1]