-
-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi Dom,
I have inserted a block and tried to find its boundingbox of height and width. it is working fine when it has lines but if it has only text then it shows incorrect values. Can you check this issue.
string TEMPpath = @"D:\Tools Development\ACAD\Text Bounding Box\empty.dwg";
String Docpath = @"D:\Tools Development\ACAD\Text Bounding Box\DIP-SWITCH-SETTING-NOTE.dwg";
string outpath1 = @"D:\Tools Development\ACAD\Text Bounding Box\textboundingbox.dwg";
CadDocument template = DwgReader.Read(TEMPpath, onNotification);
var insertpoint = new XYZ(25, 250, 0.0);
var blockInsert = InsertBlock(Docpath, insertpoint);
Insert InsertBlock(string path, XYZ insertpoint)
{
CadDocument doc = DwgReader.Read(Docpath, onNotification);
BlockRecord newBlock = new BlockRecord("New block");
foreach (var ent in doc.Entities)
{
var entclone = ent.Clone() as Entity;
newBlock.Entities.Add(entclone);
}
template.BlockRecords.Add(newBlock);
var base1 = newBlock.BlockEntity.BasePoint;
var base2 = doc.Header.ModelSpaceInsertionBase;
newBlock.BlockEntity.BasePoint = base2;
var blockInsert = new ACadSharp.Entities.Insert(newBlock)
{
InsertPoint = insertpoint // Set the insertion point
};
return blockInsert;
}
blockInsert.Block.IsExplodable = true;
template.Entities.Add(blockInsert);
var bbox = blockInsert.GetBoundingBox();
var Height = bbox.Height;
var Width= bbox.Width;
DwgWriter.Write(outpath1, template);Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working