Adding lines to a BLOCK
Moderators: SDS, support, admin
Adding lines to a BLOCK
Hello,
In order to add a line to a block definition I used something like:
line1 := TsgDXFLine.Create;
line1.Point := MakeFPoint(80, 100, 0);
line1.Point1 := MakeFPoint(150, 150, 0);
line1.Color := clBlue;
line1.Layer := FCADFile.Converter.LayerByName(cnstLayerName);
line1.SetLType(FCADFile.Converter.LTypeByName(cnstLTypeName));
line1.LineWeight := 0.7;
...
vBlock.AddEntity(line1);
It doesn't seem to work... Can you please help?
In order to add a line to a block definition I used something like:
line1 := TsgDXFLine.Create;
line1.Point := MakeFPoint(80, 100, 0);
line1.Point1 := MakeFPoint(150, 150, 0);
line1.Color := clBlue;
line1.Layer := FCADFile.Converter.LayerByName(cnstLayerName);
line1.SetLType(FCADFile.Converter.LTypeByName(cnstLTypeName));
line1.LineWeight := 0.7;
...
vBlock.AddEntity(line1);
It doesn't seem to work... Can you please help?
Re: Adding lines to a BLOCK
Hello,
Check if the line is added onto a layout and loaded into TsgDXFConverter as shown below:
After adding a line (or any other entity) to a block definition, call TsgDXFConverter.Loads() for TsgDXFBlock entity. In other words, reload a block in TsgDXFConverter after modifying:
Mikhail
Check if the line is added onto a layout and loaded into TsgDXFConverter as shown below:
Code: Select all
var
CADImage: TsgCADImage;
...
CADImage.CurrentLayout.AddEntity(line1);
if Assigned(CADImage.Converter.OnCreate) then
CADImage.Converter.OnCreate(line1);
CADImage.Converter.Loads(line1);
Code: Select all
CADImage.Converter.Loads(vBlock);
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Adding lines to a BLOCK
Hello,
Thank you, it worked great.
Best regards.
Thank you, it worked great.
Best regards.