public void WriteDimStyleXDataTest() { var dim = new DxfAlignedDimension(); dim.XData.Add("ACAD", new DxfXDataApplicationItemCollection( new DxfXDataString("DSTYLE"), new DxfXDataItemList( new DxfXDataInteger(271), new DxfXDataInteger(9) ) )); var file = new DxfFile(); file.Header.Version = DxfAcadVersion.R14; file.Entities.Add(dim); VerifyFileContains(file, DxfSectionType.Entities, (1001, "ACAD"), (1000, "DSTYLE"), (1002, "{"), (1070, 271), (1070, 9), (1002, "}") ); }
public void WriteMultipleXDataFromEntityTest() { var file = new DxfFile(); file.Header.Version = DxfAcadVersion.R14; var line = new DxfLine(); line.XData["group_name_1"] = new DxfXDataApplicationItemCollection( new DxfXDataReal(1.0), new DxfXDataReal(2.0) ); line.XData["group_name_2"] = new DxfXDataApplicationItemCollection( new DxfXDataItemList(new[] { new DxfXDataWorldSpacePosition(new DxfPoint(11.0, 22.0, 33.0)) }), new DxfXDataReal(3.0) ); file.Entities.Add(line); VerifyFileContains(file, DxfSectionType.Entities, (1001, "group_name_1"), (1040, 1.0), (1040, 2.0), (1001, "group_name_2"), (1002, "{"), (1011, 11.0), (1021, 22.0), (1031, 33.0), (1002, "}"), (1040, 3.0) ); }