How can I add XData to an entity (e.g. CadInsertObject) in Aspose.CAD for .NET?

Hi Aspose team,

I would like to ask how to correctly add XData to an entity using Aspose.CAD.
For example, I want to attach the following CadXdataContainer to a polyline or an Entity:

var xdataContainer = new CadXdataContainer();

var xdata = new CadXdata
{
    Name = "ACAD", // Application name
    DataList = new List<CadCodeValue> {
        new CadCodeValue(1000, "PK_ID:{1234567890}")
    }
};

xdataContainer.Xdatas = new List<CadXdata> { xdata };

// Assign to entity
polyline3D.XdataContainer = xdataContainer;

The XData does not appear when I open the file in AutoCAD (using commands like LIST or XDLIST).

Can you explain the correct procedure to add XData that is recognized by AutoCAD?
Thanks in advance.

@Abne,
Hi,
we have created CADNET-10162 to investigate this case and prepare example.

@Abne,
Hi,
could you please test if this example is helpful:

var xdataContainer = new CadXdataContainer();
var xdata = new CadXdata
{
Name = "ACAD", // Application name
DataList = new List
{
new CadCodeValue(1002, "{"),
new CadCodeValue(1000, "PK_ID:{1234567890}"),
new CadCodeValue(1002, "}")
}
};
xdataContainer.Xdatas = new List { xdata };