Thanks for the answer, but I still having problems updating the values
I tried with a simple dxf file that has a square of 40x40 (you can see in the uploaded file)
image.png (3.5 KB)
Then I executed this code (based on the ASPOSE-examples project)
try
{
//ExStart:AddAttribute
// The path to the documents directory.
string MyDir = RunExamples.GetDataDir_DXFDrawings();
string sourceFilePath = MyDir + "Drawing1.dxf";
FileStream fileStream = new FileStream(MyDir + "Drawing1_v2.dxf", FileMode.OpenOrCreate, FileAccess.Write);
using (CadImage cadImage = (CadImage)Image.Load(sourceFilePath))
{
foreach (var entity in cadImage.Entities)
{
if (entity.TypeName == CadEntityTypeName.DIMENSION)
{
var dimension = (CadDimensionBase)entity;
dimension.Text = "50";
}
}
cadImage.Save(fileStream);
fileStream.Close();
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
When I open Drawing1_v2.dxf I don’t see the Text dimensions changed, but when I see their properties, I can see that the new text value is changed. What do I need to do to display the new values?.
PD. If I double click on the dimensions, the new texts are displayed
Drawing1_v2.PNG (13.6 KB)