How to get ids of details

How can I get the ids of all details in the active layout? In rhinoscript, I could use Rhino.DetailNames, but it’s missing from rs syntax in python. Can’t figure out how to find how to do it with RhinoCommon.

Here is a simple example:

import Rhino
import scriptcontext as sc

def test_print_detail_ids():
    view = sc.doc.Views.ActiveView
    if not view:
    if not isinstance(view, Rhino.Display.RhinoPageView):
    details = view.GetDetailViews()
    if details:
        for detail in details:
            print detail.Id, detail.DescriptiveTitle

– Dale

Thanks! That is perfect.