Change Entity Color?
Moderators: SDS, support, admin
Change Entity Color?
part1. 4/1
Hi,
I was see demo code Editor.
Entity-Inspector-button show Entity's value(include color and pos).
But it can't change color.
How to change color of entity?
And where are sample's(or demo) of change entity value's.
Is it possible to change the color(or some value) of entity?
part2. 4/2
I found some code change entity's color.(by hlp file)
I use that code like this.
=================================================
IN Editor Demo : fEntityInspector procedure( RefreshGrid)
Entity.SetColor($000000FF);
=================================================
This code can change entity value to red.
But I want to more information about change color.
There is no another way?(easy way...)
And Now i have more question.
How to get entity from cad file?
Is there way to find entity by name(or some entity-value)?
If you have more demo code or source for these problem, please send to my e-mail.
My english is crappy. Please understand by these question.
Thanks.
Hi,
I was see demo code Editor.
Entity-Inspector-button show Entity's value(include color and pos).
But it can't change color.
How to change color of entity?
And where are sample's(or demo) of change entity value's.
Is it possible to change the color(or some value) of entity?
part2. 4/2
I found some code change entity's color.(by hlp file)
I use that code like this.
=================================================
IN Editor Demo : fEntityInspector procedure( RefreshGrid)
Entity.SetColor($000000FF);
=================================================
This code can change entity value to red.
But I want to more information about change color.
There is no another way?(easy way...)
And Now i have more question.
How to get entity from cad file?
Is there way to find entity by name(or some entity-value)?
If you have more demo code or source for these problem, please send to my e-mail.
My english is crappy. Please understand by these question.
Thanks.
Re: Change Entity Color?
Hello!
First of all we must say that Editor demo is no more supported for CAD Import VCL.
The following code get all entities in the file and changes theirs color to Yellow:
it is necessary to analyse what time entity is it and to determine whether you need it.
Sergey.
First of all we must say that Editor demo is no more supported for CAD Import VCL.
The following code get all entities in the file and changes theirs color to Yellow:
Code: Select all
procedure TfmMain.Button1Click(Sender: TObject);
var
I: Integer;
vImg: TsgDXFImage;
vEnt: TsgDXFEntity;
begin
vImg := TsgDXFImage(DNavigator.Picture.Graphic);
for I := 0 to vImg.CurrentLayout.Converter.Counts[csEntities] - 1 do
begin
vEnt := TsgDXFEntity(vImg.CurrentLayout.Converter.Sections[csEntities].Entities[I]);
vEnt.SetColor(clYellow);
vImg.CurrentLayout.Converter.Loads(vEnt);
end;
DNavigator.Invalidate;
end;
When you get an entity by the following line:Is there way to find entity by name(or some entity-value)?
Code: Select all
vEnt := TsgDXFEntity(vImg.CurrentLayout.Converter.Sections[csEntities].Entities[I]);
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support