Hello Timo,
Sorry for the delay in our reply.
Please try the following routine:
Code: Select all
procedure SendEntitiesToBack(ACADImage: TsgCADImage; ALayerName: string; 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) and (vDXFEntity.Layer.Name = ALayerName)) then
begin
Inc(Count);
vModelSpaceBlock.InsertEntity(Count - 1, vDXFEntity);
vModelSpaceBlock.DeleteEntity(I + 1);
end;
Inc(I);
end;
end;
To draw the solid fill entities which belong to the layer "Koki_Grafiikka_Tausta" at first, you should call the given routine as follows, then redraw the CAD image.
Code: Select all
SendEntitiesToBack(vCADImage, 'Koki_Grafiikka_Tausta', ceCurvePolygon);
Mikhail