The groups
(1002 . "{") and
(1002 . "}") are primarily used to group sets of DXF data, for example, if your data were to contain multiple sets of the 'watts' & 'phase' DXF groups, you could implement the DXF groups 1002 in the following way:
(
"RAK"
(1002 . "{")
(1000 . "watts")
(1070 . 180)
(1000 . "phase")
(1070 . 1)
(1002 . "}")
(1002 . "{")
(1000 . "watts")
(1070 . 200)
(1000 . "phase")
(1070 . 2)
(1002 . "}")
)
Aside from the readability benefits for those visually inspecting the xdata, by grouping & structuring the data using known delimiters, this method ensures that the xdata is parsed accurately and consistently.
For example: assume that the data is
not grouped using 1002 delimiters and that, by chance, one of the DXF groups is missing from the data.
Now, when the xdata is parsed, the parsing function is relying on a known order of the xdata DXF groups and also a predetermined number of groups in each set. If only one of the expected DXF groups is missing for some reason, a pair from the next set of DXF groups will be erroneously included in the wrong set, rendering the data useless.
Whereas, if the xdata is consistently grouped using DXF group 1002 codes, any parsing function can use these groups as fixed delimiters indicating where one set of xdata ends and the next begins, and hence ensuring that the data is grouped accurately every time, even if data is missing for any reason.
Of course, for a single data set (as per your example), this is not strictly necessary, however, I would still recommend including the 1002 DXF groups for both consistency with how AutoCAD inherently stores xdata, and to allow for any future expansion of the data without the need to restructure the existing data or to rewrite the xdata parsing function.
There may be other advantages to using the DXF 1002 groups that I have overlooked, but in my opinion, the above points are sufficient to warrant their use.
Lee