Hi,
I have custom entity and I want to copy or move it using autocad copy and move commands.
My entity have base point around which entity are drawn.
If I use copy command I can see image of custom entity move with mouse cursor, but pressing on insert location here are no custom entity it is at original custom entity location. So I guess, a copy of custom entity is made but base point are not changed and it is save at original entity location.
Move command too don't change base point.
I don't know which methods I need to implement for move and copy commands to work.
Solved! Go to Solution.
Solved by tbrammer. Go to Solution.
Overwrite these methods in your custom entity class:
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus subGetTransformedCopy(const AcGeMatrix3d& xform,
AcDbEntity*& pEnt) const;
***virtual Acad::ErrorStatus subGetTransformedCopy(const AcGeMatrix3d& xform,
AcDbEntity*& pEnt) const;***
***This method does not work to copy entity ****
@KIMHENGHOR98 wrote:
***virtual Acad::ErrorStatus subGetTransformedCopy(const AcGeMatrix3d& xform,
AcDbEntity*& pEnt) const;***
***This method does not work to copy entity ****
You should not call subGetTransformedCopy() directly. Instead call
I recomment reading the "Deep Cloning" article to understand in which cases you need Deep Cloning and how to implement custom classes that support Deep Cloning. Also make sure to understand the difference between copying within one database and from one database to another.
Can't find what you're looking for? Ask the community or share your knowledge.