How to use this function?

I want to add this info panel, I check the doc, it writes:

  • info_panel ( bool , optional ) – show information panel and fill with .description property of item

but I dont know how to add it

This was built specifically for the preflight checks tool
It grabs the description of the check:

from pyrevit import forms
selection =[1,2,3,4],info_panel = True)


This will work up to a point β†’ showing the info panel when one of the number is selected, but by design it will require that the list of elements passed contains a description

Like in one of the model checker check

1 Like

I saw the code too, but I don’t know how to pass a description to those element :frowning:

I use it as is only for preflight checks. I cannot help much more. Sorry.

So the list of elements need to be Classes and the description is contained in the triple quote comment β€œβ€" description here β€œβ€"

Not sure if you’re able to wrap what’s in your list in a Class, but that seems to be the way to go.

@newshunhk pyRevit form will call getattr(item, 'description', '') on the items passed to the dialog to see if it has a description property and attempts to get its value. So simply, passing a set of tuples with description property would do the job