Changing Attrib positions in TsgDXFInsert

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

Moderators: SDS, support, admin

Post Reply
bilcan
Posts: 7
Joined: 19 Aug 2011, 16:37

Changing Attrib positions in TsgDXFInsert

Post by bilcan » 19 Sep 2011, 17:49

Hi,

I can change TsgDXFInsert positions but I'can't change TsgDXFAttdef or TsgDXFAttrib in the TsgDXFInsert. When I move a TsgDXFInsert entity, Attribs which are in the TsgDXFInsert are keep their positions.

Could you help me to do that.

Bilal.

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

Re: Changing Attrib positions in TsgDXFInsert

Post by support » 20 Sep 2011, 11:53

Hello Bilal.
Attrib object displays on drawing specified string value instead the corresponding Attdef object that is inside a block. DXF specification provides Attribs placement on the drawing. TsgDXFAttrib have drawing coordinates and doesn't moved with insert. Insert moving affects placement of entities that contained in corresponding block.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

bilcan
Posts: 7
Joined: 19 Aug 2011, 16:37

Re: Changing Attrib positions in TsgDXFInsert

Post by bilcan » 20 Sep 2011, 12:37

Hi,

do you mean do I have to move Attribs individual?

Bilal.

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

Re: Changing Attrib positions in TsgDXFInsert

Post by support » 20 Sep 2011, 13:05

That's correct. Attribs have drawing coordinates and must be moved separately. Moving insert affects placement of entities inside correspond block only. Such entities have block coordinates.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

bilcan
Posts: 7
Joined: 19 Aug 2011, 16:37

Re: Changing Attrib positions in TsgDXFInsert

Post by bilcan » 20 Sep 2011, 13:31

Hi,

all entities in the TsgDXFImage are moved except Attribs, please check out the images, I am trying to move an Insert and Attribs stay where it is. I used Editor demo.

Bilal.
Attachments
CAD2.png
CAD2.png (16.08 KiB) Viewed 31755 times
CAD1.png
CAD1.png (22.25 KiB) Viewed 31755 times

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

Re: Changing Attrib positions in TsgDXFInsert

Post by support » 20 Sep 2011, 17:29

Hello Bilal.
Editor demo doesn't provided as full-functional application but demo. Unfortunately it doesn't support attribs visual editing, sorry. Such feature provided by ABViewer for example. Anyway you can move inserts with attribs programmatically:

Code: Select all

  ent := Img.Converter.Entities[index];
  if ent.EntType = ceInsert then
  begin
    TsgDXFInsert(ent).Point := MakeFPoint(x, y, z);
    Img.Converter.Loads(ent);
    for I := 0 to TsgDXFInsert(ent).Attribs.Count - 1 do
      Img.Converter.Loads(TsgDXFInsert(ent).Attribs[i]);
  end;
  Img.GetExtents();
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

bilcan
Posts: 7
Joined: 19 Aug 2011, 16:37

Re: Changing Attrib positions in TsgDXFInsert

Post by bilcan » 20 Sep 2011, 18:55

Thank you alex it works.

Post Reply