Text is behind hatch!

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

Moderators: SDS, support, admin

Post Reply
Timo
Posts: 10
Joined: 14 Oct 2009, 14:01

Text is behind hatch!

Post by Timo » 17 Jun 2019, 11:15

Hi

How I can force text entities to front of all other objects?
I have tried sort objects and changing z-coordinates.

-- Timo
Attachments
cad_text.jpg
cad_text.jpg (10.09 KiB) Viewed 7435 times

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

Re: Text is behind hatch!

Post by support » 17 Jun 2019, 17:47

Hello Timo,

You can modify this routine to bring the entities of certain type (e.g. ceText) to front of all other entities. For example:

Code: Select all

procedure BringEntitiesToFront(ACADImage: TsgCADImage; EntType: TsgCADEntities);
var
  I, Count: Integer;
  vModelSpaceBlock: TsgDXFBlock;
  vDXFEntity: TsgDXFEntity;
begin
  I := 0;
  Count := 0;
  vModelSpaceBlock := ACADImage.Converter.BlockByName('*MODEL_SPACE');

  while I < vModelSpaceBlock.Count do
  begin
    vDXFEntity := vModelSpaceBlock.Entities[I];
    if (vDXFEntity.EntType <> EntType) then
    begin
      Inc(Count);
      vModelSpaceBlock.InsertEntity(Count - 1, vDXFEntity);
      vModelSpaceBlock.DeleteEntity(I + 1);
    end;
    Inc(I);
  end;
end;
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply