Select Reference Set

I'm wondering if there is a simple way to display a UI that lists all the reference sets present in a part and allows the user to select a reference set for storage as a dim. I unfortunately also don't have a license for the UI styler, so I'm trying to accomplish this entirely within a journal.

Thanks in advance for any help. I am new to journaling in NX, so forgive my ignorance.

https://nxjournaling.com/content/using-winforms-journals
The article linked above shows how to use a winform with a journal. No special licenses are required, but you should have an IDE that allows you to design winforms (such as Visual Studio community edition - which is free).

I'm not entirely sure what you mean by "for storage as a dim"; can you elaborate on that? I think you mean using a variable to refer to a particular reference set later in your code?

So, I have gotten a simple form to work with the code I'm using, just like the example above, but it requires you to know what ref sets are present and to type in the name of the one you want. What I really would like is to return a list of the ref sets present in a part and allow the user to pick one from a dialogue box. And yes, I want to store the picked reference set as a variable for later use in the code.

The example journal queries an attribute in the work part and passes that info to the form for display/editing. Your journal can use a similar technique: iterate through the ref sets in the desired part, saving the info and passing it to the form for display. The user can select from the form and the journal can process the ref set accordingly. One way to do this would be to create a dictionary object of type (string, refset); iterate through the ref set collection adding the (refset.Name, refSet). Pass the dictionary to the form and display all the names in a list. When the user selects a name from the list, get the corresponding ref set from the dictionary and continue processing.