Page 1 of 1

Changing Attrib positions in TsgDXFInsert

Posted: 19 Sep 2011, 17:49
by bilcan
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.

Re: Changing Attrib positions in TsgDXFInsert

Posted: 20 Sep 2011, 11:53
by support
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.

Re: Changing Attrib positions in TsgDXFInsert

Posted: 20 Sep 2011, 12:37
by bilcan
Hi,

do you mean do I have to move Attribs individual?

Bilal.

Re: Changing Attrib positions in TsgDXFInsert

Posted: 20 Sep 2011, 13:05
by support
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.

Re: Changing Attrib positions in TsgDXFInsert

Posted: 20 Sep 2011, 13:31
by bilcan
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.

Re: Changing Attrib positions in TsgDXFInsert

Posted: 20 Sep 2011, 17:29
by support
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.

Re: Changing Attrib positions in TsgDXFInsert

Posted: 20 Sep 2011, 18:55
by bilcan
Thank you alex it works.