Issue: Rhinocommon DimensionStyle.DrawForward Property cannot be set

Hi there!

according to the documentation I should be able to set the ‘DrawForward’ property of an annotiation style using the code below. However currently it only returns the current value.

cheers,
Tim

import scriptcontext as sc

dimStyle = sc.doc.DimStyles.Find('TNM_ELEMENT_TAGS', True)


if dimStyle:
    
    dimStyle.DrawForward = False
    print dimStyle.DrawForward

image

How about this?

import scriptcontext as sc

old_style = sc.doc.DimStyles.Find('Test', True)
if old_style:
    print("Old value: {0}".format(old_style.DrawForward))
    new_style = old_style.Duplicate()
    new_style.DrawForward = not new_style.DrawForward
    if sc.doc.DimStyles.Modify(new_style, old_style.Id, True):
        style = sc.doc.DimStyles.Find('Test', True)
        if style:
            print("New value: {0}".format(old_style.DrawForward))

– Dale

Thank you @dale!