Q1.
Apart from "color" and "linetype", what are the group codes for lineweight, transparency, material?
I am not sure if "370" is the group code of "lineweight".
The group codes common to all entities may be found
here; in short, for the basic object properties, we have:
- 8 = Layer
- 62 = Colour
- 370 = Lineweight
- 6 = Linetype
Per the linked reference, material is stored by DXF group 347 (a pointer to the material entity), and entity transparency is stored by DXF group 440.
Q2.
And it is a bit interesting (62 . "Bylayer") doesn't work for setting color to "bylayer" instead of (62 . 256).
Is it correct?
Then how to set it to "byblock"?
DXF group codes have
specific data types based on the range within which the group code falls; per the reference, DXF groups 60-79 are always 16-bit integer values, hence DXF group 62 must hold a 16-bit integer value.
Per the first linked reference, use 256 for ByLayer and 0 for ByBlock.
Q3.
Furthermore, how to set "bylayer" or "byblock" to "lineweight", "transparency" and "material" as they are not numeric values?
These are all explained in the references linked above.