How to override AcDbEntity::transformBy to get custom entity transformation while moving or scaling?

StackOverflow https://stackoverflow.com/questions/12874124

  •  07-07-2021
  •  | 
  •  

I'm implementing a custom entity derived from AcDbEntity. I draw some lines and text label in overloaded subWorldDraw function and I want my entity to be able to be scaled, moved, rotated, so as I understand I should override AcDbEntity::transformBy, as was written here. But when I try to add this method, compiler rises an error, which tells, that this method is sealed. Is any another way to make my entity responsible to transformation done by user?

有帮助吗?

解决方案

I've found answer here - in new ObjectArx versions not AcDbEntity::transformBy, but AcDbEntity::subTransformBy method can be overridden. It's also touch on other virtual methods, like AcDbEntity::worldDraw -> AcDbEntity::subWorldDraw.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top