All of the above. I believe I started with the script repo (excellent source of information).
I started with the example of ExportAllSegmentsToLabelmapNode, but discovered the values were remapped.
I then check API docs for ExportAllSegmentsToLabelmapNode, but didn’t see anything about values.
While posting to this thread, I found the SegmentationNode.GenerateMergedLabelmapForAllSegments method, which includes the ability to supply the label values. This is currently my preferred method, as it is less steps than creating the color table.
On segmentation import, my module applies a custom color theme to the segments using a python dict that includes segment ID, value, and color. So I have not used color tables / terminologies and hadn’t considered their use until I saw @muratmaga suggestion.
After that I noticed that the script repository does include ExportSegmentsToLabelmapNode, which uses the color table to provide the values. This would have also been a fine solution if I had seen it from the beginning.
I didn’t see anything on the forum that had the solution, but I hope this thread is useful to others that run into the issue.