Modify Entity Matrix and save changes

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
FieldConsult
Posts: 54
Joined: 14 Mar 2015, 22:33

Modify Entity Matrix and save changes

Post by FieldConsult » 17 Mar 2015, 14:27

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!

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Modify Entity Matrix and save changes

Post by support » 17 Mar 2015, 16:03

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

FieldConsult
Posts: 54
Joined: 14 Mar 2015, 22:33

Re: Modify Entity Matrix and save changes

Post by FieldConsult » 17 Mar 2015, 17:35

What about TsgDXFInsert??

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Modify Entity Matrix and save changes

Post by support » 18 Mar 2015, 15:52

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply