Page 1 of 1

Modify Entity Matrix and save changes

Posted: 17 Mar 2015, 14:27
by FieldConsult
Is possible modify the Entity matrix and save the changes to the drawing?
Example:
xMatrix:= Entity.GetMatrix;
xMatrix.V4[0]:= 1.5
xMatrix.V4[1]:= 2.0

and set that matrix to entity again?

Thanks!

Re: Modify Entity Matrix and save changes

Posted: 17 Mar 2015, 16:03
by support
Hello,

It is not possible to modify the entity matrix, because TsgDXFEntity class doesn't have methods such as GetMatrix/SetMatrix or Matrix property.


Mikhail

Re: Modify Entity Matrix and save changes

Posted: 17 Mar 2015, 17:35
by FieldConsult
What about TsgDXFInsert??

Re: Modify Entity Matrix and save changes

Posted: 18 Mar 2015, 15:52
by support
Hello,

TsgDXFInsert class has the protected FMatrix field which can be accessed using a class that descends from TsgDXFInsert, for example:

Code: Select all

TsgDXFInsertAccess = class(TsgDXFInsert);
Therefore, it is possible to modify the block reference (INSERT) coordinates using a specified matrix (TFMatrix).


Mikhail