Get View Coordinates to Open Pop-up

I need to open pop-ups in a specific location when selecting a pushbutton. I need the x and y coordinates of the view I want to use as a location. How can I find those parameters?

Also, if the user opens multiple pop-ups and selects one that is already open, I need to bring it to the front without opening a new pop-up.

I am trying to figure out how to post a picture of my screen for reference.

On a windows machine you can use Win + Shift + S to drag an area and get a screenshot (assuming you’re not on an extremely old windows).

The Popup Command on the action menu has more options than the script version (at least last I checked). If that changed it’s only changed in newer versions. I’ve been using the popup command instead of the script for a while so that may have changed.

The lower right corner of the popup command has options for specifying where the popup will appear. It also allows you to force the popup to appear within your viewport and appear in a location relative to mouse position. It’s pretty nice.

The “Identifier” property should be used to identify specific instances of a popup. If you’re making multiple instances of the same popup you probably want to pass something in as a parameter that can be used to derive the popup ID so you can close the instance with a script on the popup and so you can only open one of each type.

That should be enough to get you moving in the right direction. I’ll try to check back in case you have more specific questions later.

Finally allowed paste of screen.

You might want to consider having a dock with a flex layout on the right and popping instances of your view into that. There’s a number of ways you could handle that layout but you could support any number of instances in that flex sidebar via a scrollbar.

It might make sense for it to be a flex repeater if they’re all instances of the same popup. You can generate the json for a flex repeater in a script transform off a binding or something along those lines.

The buttons are the left side docked view, and the pop-ups go in the right side docked view.

Are all the popups separate instances of the same view?

If they are, you can put a flex repeater in the right side dock and create/remove instances from that.

I don’t have time at the moment to build a test app but I have a hunch that you can let the flex repeater handle all the layout stuff for you and just create and remove instances of the “popups” with a message handler or binding.