add xdata to create a dimstyle override , in python it would be
xd = [(1001, "ACAD"), (1000, "DSTYLE"), (1002, "{"), (1070, 178), (1070, 1), (1002, "}")]
# add dim override
@command
def doit2():
ps, id, _ = Ed.Editor.entSel("\nSelect:", Db.Dimension.desc())
if ps != Ed.PromptStatus.eOk:
return
dim = Db.Dimension(id, Db.OpenMode.kForWrite)
# todo check if there's aready a dimstyle override
# 178 = dimclrt
# 1 is red
xd = [(1001, "ACAD"), (1000, "DSTYLE"), (1002, "{"), (1070, 178), (1070, 1), (1002, "}")]
dim.setXData(xd)