[Closed] How to detect if a PopupDialog is open?
Hi guys,
is there a way to detect if there’s a PopupDialog open? I’m referring to those for Editable Poly objects like Extrude, Bevel, Bridge, and so on. Knowing exactly which Popup is open isn’t strictly required.
I need to perform some refreshing in my cache if topology/geometry is changed upon sub object selection changes.
Thank you very much.
- Enrico
I believe you can use this function to detect if the dialog is open:
windows.getChildrenHWND
then use this to press a button:
windows.sendMessage
the hard part (i guess) is looking for the correct integer HWND.
I haven’t actually used these functions myself but I hope this helps.
edit:
stumbled upon these today, search for these in the help file:
DialogMonitorOPS
UIAccessor
Thanks Galagast,
I’m going to look into it, seems to be what I need. Just found some of the voodoo magic left by ZeBoxx2 in this thread too.
The idea is to make a better subObject selector, that works during preview state started by commands with popup dialog.
- Enrico
Here is the code to check if a particular dialog is open. In the sample the “Extrude Polygons”. It returns the handler if found, or undefined if not found.
(
hwndExtrudePolygons = windows.getChildHWND (windows.getDesktopHWND()) "Extrude Polygons"
format "hwndExtrudePolygons: %n" hwndExtrudePolygons
)
Returns:
hwndExtrudePolygons: #(11406358P, 65552P, 5308582P, “#32770”, “Extrude Polygons”) – on my machine, if dialog is open
hwndExtrudePolygons: undefined – if there’s not that dialog
- Enrico