How to load global enumeration list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Labels:
-
Windchill Visualization
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Well, there might not be a loader however, a utility can be written to read a file and created the global enumeration.
To prove this out I wrote a utility, GlobalEnumerationHelper2, that contains a method accepts two arguments, Global Enumeration Name and a List<String> of values.
Can easily expand this utility to read a file to get the Global Enumeration's name and the values for the enumeration.
Maybe a CSV where the first column is the Global Enumeration's name and each subsequent column holds a value for an entry. Just a thought. Lot's of ways to do it.
The code is kind of complicated but once you see the pattern everything falls into place.
The global enumeration itself requires storing 3 entries into the database.
Each value in the enumeration requires storing 5 entries in the database.
So, is you have 10 entries in your enumeration, 3 + (5 x 10) = 53 stores to the dB. Who knew?😀
Run from Windchill shell looks like this:
Results after run:
Seems to work well.
Interesting utility to figure out.👍
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
At the moment there is only an export. You can export it from your Windchill and load it to another one. But I guess you are looking to add some entries to the list and that's not possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have bulk data thats why im trying to load instead of doing manually.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Well, there might not be a loader however, a utility can be written to read a file and created the global enumeration.
To prove this out I wrote a utility, GlobalEnumerationHelper2, that contains a method accepts two arguments, Global Enumeration Name and a List<String> of values.
Can easily expand this utility to read a file to get the Global Enumeration's name and the values for the enumeration.
Maybe a CSV where the first column is the Global Enumeration's name and each subsequent column holds a value for an entry. Just a thought. Lot's of ways to do it.
The code is kind of complicated but once you see the pattern everything falls into place.
The global enumeration itself requires storing 3 entries into the database.
Each value in the enumeration requires storing 5 entries in the database.
So, is you have 10 entries in your enumeration, 3 + (5 x 10) = 53 stores to the dB. Who knew?😀
Run from Windchill shell looks like this:
Results after run:
Seems to work well.
Interesting utility to figure out.👍
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks d_ghaham Its working fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi David, I know this is an old post, but just wanted to check if you had attached the utility to this thread. I don't see any attachments here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @d_graham ,
I have have an excel file with 1500+ entries.
And I want to create an enumeration.
So can you share that utility which will save my time and I can create the enumeration.
Personally You can share that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @d_graham
I am also doing the same task so it would be great if you can share your utility for reference.
You can share the utility personally as well.
