Moving custom Meta-data from one project to another Version: 1.9.16.0

1.9.16.0 has Import Scrivner Project and that does not import the meta data either.

Checked junk mail… nope… no response yet.

My guess is that although the visible names are the same between the projects, the underlying IDs for the fields are not for those couple that are not copying data. This could be because they were renamed at some point or because multiple fields with the same name were created (so the IDs became name1, name2, etc.). Making the IDs match will allow the copied metadata to display in the target project.

You might be able to do that within Scrivener by creating a new metadata field in the target project for each of the fields that isn’t copying, if you know for instance that the current ones were renamed to match the first project (and if the current ones aren’t already in use in the project). But barring that, you can do this by closing the projects in Scrivener and then using a text editor to view and edit the projects’ .scrivx files. I’d recommend making a project backup for each project first. Then, you can right-click the project file in File Explorer and choose Open with… from the context menu. These are just XML files, so any plain-text editor will be fine, although one that handles syntax would make the job easier.

Open both files so you can compare them and scroll or search for “CustomMetaDataSettings” in the file. Here you’ll find each custom metadata field’s ID and the name that appears in Scrivener. In this example, the ID is “startdate” but the name as shown in Scrivener is “Start Day”

<MetaDataField ID="startdate" Wraps="No" Color="0.000000 0.066667 0.286275">Start Day</MetaDataField>

For each of the metadata fields you’re trying to copy that have matching names but not matching IDs, you’ll want to change the ID in one of the project files to match the ID used in the other. So for instance, if you had the above in the first project but

ID="startday"

in the other, you could change “startday” in Project 2 to “startdate”. The caveat is that you need to be sure you don’t already have a metadata field in Project 2 using that same ID. You want unique IDs within a single project, but matching IDs between the two projects you’re copying between.

In addition to changing the ID here, you will need to change it throughout the file for any items that have the metadata assigned. Search the file for each instance of

<FieldID>startday</FieldID>

(using of course whatever ID name it is that you’re changing), ensure that this is within a <MetaDataItem> </MetaDataItem> section, and replace the “startday” text with “startdate”. Repeat that for each of the metadata field IDs you’re updating.

Once you’ve made and saved the changes (be sure your text editor doesn’t try to change the .scrivx extension of the file), reopen the projects in Scrivener. If you changed the field IDs in the target project to match those in the initial project, the metadata from previously copied documents should now appear. If you went the other way around, you’ll need to recopy the items from the first project into the target project.

1 Like

OK… I’ll give it a try Friday… heading out now and tied up all day tomorrow… thanx for the reply!

So I was able to try what you suggested and it looked promising at first as the Series file had the tags called “month” and “day” instead of “startdate” and “enddate”, because the Series file was already synced with Aeon Time line, I decided to change the Book project file tags to “month” and “day” as well. Before doing so, I backed up both files calling them X_orginaname." When I opened X_Bookname.scrivx, the Start Date and End Date custom meta-data fields were blank? :disappointed:

Perhaps I misunderstood what you were trying to tell me?

It sounds like you did it right, and if I’m understanding correctly, you just need to recopy the documents from the one project to the other. The main potential confusion here is with the names, so to be sure we’re identifying the projects correctly, I am assuming:

  • BookProject is the one you’re dragging from
  • SeriesProject is the one you’re dragging to

If you changed the metadata ID names in the BookProject, you’ll need to recopy those (now with the updated ID names) to the SeriesProject in order for the metadata to show. Had you done it the other way around, changing the metadata ID names in the SeriesProject, that wouldn’t be necessary (because the data did copy the first time, but it’s using a different ID). Given the situation of syncing with Aeon, the way you did it makes perfect sense; so it just needs that final step of recopying the files.

Well, I was able to get it to work but not the way you described in your follow-up instructions.

Unless I missed something in your original instructions, there was a step missing. It is not enough to just change the fieldID’s in “CustomMetaDataSettings.” I had to go through the XML file and look for all the entries for that old meta data field name tag and change them to the new tag. I used Notepad and Crtl-H. I “found” the old tag and replaced it with the new tag using the option to replace all. Once I did that, and saved it, the altered project showed the data in the custom meta-data named “Start Date” and “End Date”. Once these showed in the Book Project, I easily moved it over to the Series Project successfully.

I am not sure how your follow-up instructions correct the problem of finding and changing all the fieldID’s within the meta-data structure of the xml file, but my approach worked for me. Thank you sooooo much! This really saved me a lot of time and I have another book in the series that needs this done, so the cumulative time saved will be tremendous.

THANK YOU! THANK YOU! THANK YOU!

2 Likes

No, you’re quite right, I missed that in the original and the follow-up. I’ll correct the initial post with the instructions for anyone else who needs to refer to this. Thank you for catching that, and I’m glad you were able to get it working in spite of my omission!

2 Likes