Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: BuddyRobbins_Linquest on June 18, 2019, 04:08:40 am

Title: DoBaselineMerge problem
Post by: BuddyRobbins_Linquest on June 18, 2019, 04:08:40 am
I'm trying to call DoBaselineMerge, through a script. Following the instructions, I get the results from DoBaselineCompare, and get the Guids from the items I want to bring up from the baseline.  I generate a string that looks like this:
    <Merge>
        <MergeItem guid="{CCADD68E-468A-49fc-B6CD-E02D52CDA90A}"/>
        <MergeItem guid="{0260F1EA-F8A2-4ce4-B7D4-30653D0CF013}"/>
    </Merge>


I save the string to a file, using FileSystemObject.  When I call DoBaselineMerge, I get an error message: Invalid at the top level of the document.
I tried adding a <?xml version="1.0" encoding="UTF-8"?> to the beginning of the string before I save it, but no joy.

What am I missing?
Thanks in advance,
-Buddy
Title: Re: DoBaselineMerge problem
Post by: BuddyRobbins_Linquest on June 18, 2019, 04:52:53 am
OK, I found it.
Even though the documentation describes the MergeInstructions parameter as the file containing the GUID... in reality, there is no file. Just a string that contains the <Merge><MergeItem guid="{XXXXX}"/></Merge>
All that FileSystemObject junk I did to persist the instructions to a file & read it back in was wrong.