Skip to main content

Posts

Showing posts with the label Dynamics AX 2009 labels

Extracting labels from one labelfile to another

Recently I've had an assignment where we needed to "split up" a label file. The assignment was to: * read thorugh a label file. * If any labels were encountered with a number bigger then N these should be written to a new label file AND any references to these labels should be replaced in the code. So I exported all adjustments/code made to an .xpo file, and I took a copy of the label file. Then I wrote a class that did the "splitting up" of the label file and the search/replace of labels in the code (.xpo file). This made for use of an other entry in this blog, namely extracting text from a label, and for some interesting use of the TextBuffer object for search/replace. Here you can download the code. Use at own risk !!!