I am developing a custom menu item which will be added to Tools menu of LabVIEW as shown in the below screenshot. But I am unable to get the name of the library from which the menu item is selected. 
To achieve this currently, I am getting the names of libraries which are in memory. It will work only if there is only one library in memory. But if there are many libraries in memory, How can I know from which library the menu item is selected.
The same issue is applicable to the project also. But for the project, I am currently getting Active Project reference. But what can I do for the library?