How to get the same type of component dbid for different floors

clipboard.png

I have the dbid, of the widget in the red box. I need to find the dbid, of the widget with the same name in the yellow box and the name of their parent node is the same. Is there any easy way?
I now look up the dbid of all components with the same name through viewer.search,
, then query their properties
through getBulkProperties, and then traverse one by one to see if the names of the parent nodes are the same.
is there another way?

Sep.10,2021

should be the only way to
get attributes using getProperties
parent object using getNodeParentId (dbId)?

Menu