Skip to content
Discussion options

You must be logged in to vote

Generally, you would work through the dimension style or a dimension override
try the override

from pyrx import Rx, Ge, Gi, Db, Ap, Ed, Ax, command
# https://www.keanw.com/2009/09/creating-and-overriding-autocad-dimension-styles-using-net.html


# change the dimstyle
@command
def doit1():
    db = Db.curDb()
    dimStyle = Db.DimStyleTableRecord(db.dimstyle(), Db.OpenMode.kForWrite)
    old = dimStyle.dimclrt()
    
    clr = Db.Color()
    clr.setColorIndex(1)
    
    dimStyle.setDimclrt(clr)
    print(dimStyle.getName(), old, dimStyle.dimclrt())


# add dim override
@command
def doit2():
    ps, id, _ = Ed.Editor.entSel("\nSelect:", Db.Dimension.desc())
    if ps != Ed.PromptStatus.eOk:…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gswifort
Comment options

gswifort Mar 24, 2025
Collaborator Author

Answer selected by gswifort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants