Get Current Detail Scale

Hi,

I’ve been successful using DetailGeometry.SetScale to set the scale of a detail. How can you get the current scale of the detail before you run DetailGeometry.SetScale so you can do some math on it first based on the current scale.

Python by the way using Rhino 5 or 6.

Eric

Hi @eric.bunn,

This works in Rhino 6:

def PrintDetailViewScale():
    page_views = sc.doc.Views.GetPageViews()
    for page in page_views:
        print(page.PageName)
        details_views = page.GetDetailViews()
        for detail in details_views:
            page_model_ratio = detail.DetailGeometry.PageToModelRatio
            if 0 == page_model_ratio: # perspective projection
                page_model_ratio = 1.0
            layout_scale = 1.0
            model_scale = 1.0 / page_model_ratio
            print(layout_scale, model_scale)

– Dale

Thank you Dale. I’ll try this out tomorrow. Looks like it will work for me.

Eric