You can't really extract the toolbox content. You would need to read and parse the corresponding MDG which is not always available. If so, parsing it will give you headaches. Probably you have to hard-code you menu. Question: why? If you have a good answer: go ahead. Else: teach them to use the toolbox which is adaptable flexibly.
q.
Thank you for your response! This is the problem I am facing now:
I want to provide users with their own MDGs the capability to have my tool recursively scan and extract the types and stereotypes of the elements within the project. The goal is to store these types and stereotypes and make them available to users later, allowing them to create new elements. I understand that the selection will be limited to the elements that have already been created but that's fine.
Now, I have a couple of questions that I hope you can help me with:
For creating elements within these custom MDGs, do I only need the type name and stereotype name in the format "Technologyname::Stereotype," or is there more information required?
My second question is related to extracting the technology name. When I use element.StereotypeEx to retrieve the stereotype name of the elements, it returns only the stereotype without the technology name. How can I obtain the technology name as well?
The reason I'm trying to do this is to allow users to import elements from another tool and specify as which element type and stereotype these imported elements should be recognized.