same handle value
Moderators: SDS, support, admin
same handle value
Hello.
I insert an entity with this code:
Some may overlap with handle you already have a handle on the Entity that inserted.
Is it seems what the cause?
thanks,
I insert an entity with this code:
Code: Select all
function TMyCadImage.AddBlock(InsPoint: TFPoint; BlockName: String;
DegreeAngle: Double; LayerName: string; Color: TColor): Int64;
var
Insert: TsgDXFInsert;
Block: TsgDXFBlock;
Layer: TsgDXFLayer;
begin
Result := 0;
if not Assigned(FConverter) then Exit;
Block := FConverter.BlockByName(BlockName);
if (Block = nil) then Exit;
Layer := FConverter.LayerByName(LayerName);
Insert := TsgDXFInsert.Create;
if Assigned(FConverter.OnCreate) then
FConverter.OnCreate(Insert);
Insert.Layer := Layer;
Insert.Block := Block;
Insert.Point := InsPoint;
Insert.Color := Color;
Insert.Angle := DegreeAngle;
FConverter.Layouts[0].AddEntity(Insert);
if Assigned(FConverter.OnCreate) then
FConverter.OnCreate(Insert);
FConverter.Loads(Insert);
FConverter.SortEntitiesInZDepth();
FCadImage.GetExtents;
Result := Int64(Insert.Handle);
end;
Is it seems what the cause?
thanks,
Re: same handle value
Hello.
A created insert entity will receive a new handle. However the referenced block and block's inner entities can be shared by multiple inserts.
Alexander.
A created insert entity will receive a new handle. However the referenced block and block's inner entities can be shared by multiple inserts.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: same handle value
I found the cause
To hold the data that is linked to Entity in the current project, it is necessary to always save
However, because save is heavy, we are going to save in the thread, it was due
We are going to review the specification
I'm sorry for being late
Thank you
To hold the data that is linked to Entity in the current project, it is necessary to always save
However, because save is heavy, we are going to save in the thread, it was due
We are going to review the specification
I'm sorry for being late
Thank you