Forum

Please or Register to create posts and topics.

Create group to include the parents of each spouse

PreviousPage 2 of 2

Jaime-

I just saw your post where you mentioned that you didn't know what to do the the previous version of my Cousins script. Well, that means you won't know how to use the finished script either-  so...
Here goes-

I assume that you're using Windows, if not, I haven't tested my script on MacOS, so stop here. Someone needs to lend me a Mac so I can release my utilities for the Mac as well.

The instructions assume you are using RM v9. I haven't tested on other versions.

It's very important that you have backups of your database saved in safe location and that this utility not be run on your main database (at least initially or until you have confidence in it.)

Once this is set up, you'll be able to update the group with one double click.

Go to my website https://richardotter.github.io and find the line:
RootsMagic Group creator utility: “GroupFromSQL”

Click the header link and it will show a page at Github.
On that page, find the line:
GroupFromSQL.v1.1.0.0.zip

Click the link and it will download a zip file to your computer.
Save it your usual downloads folder, or wherever (as long as you know the location)

Get the unifuzz64.dll from the SQLiteToolsforRootsMagic website at this link:
https://sqlitetoolsforrootsmagic.com/wp-content/uploads/2018/05/unifuzz64.dll

Click the link and save the file to the downloads folder.

I have attached to this post a customized configuration file for your use -
it is called "custom-RM-Python-config.ini_.sql"
(I had to name it with an sql extension due to web site rules. It just a text file.)

Click the link and do a Save to your Downloads folder.

Now you have everything you need.

In Windows file explorer, open the Downloads folder and right click the zip file and select "Extract All..."
This will create a folder in the downloads folder with the same name as the zip file. It will open that folder showing another folder, again with the same name.
Let's call this last folder the "Working Folder".

Open the "Working Folder" and see the contents-
ReadMe.txt
RM-Python-config.ini
GroupFromSQL.exe
GroupFromSQL.py

Move the "unifuzz64.dll" from the downloads folder to the "Working Folder".

Move the "custom-RM-Python-config.ini_.sql" from the downloads folder to the "Working Folder".

Make a copy of you main database and copy it to the Working Folder.
(If you have any questions about making a copy of your database, you should
probably stop here and ask for help from a local person)

Rename the copy in the Working Folder to "TEST.rmtree"

(MAKE SURE that your original database is where it is supposed to be, and that you have a set of backups)

So now the Working Folder has these files-
ReadMe.txt
RM-Python-config.ini
GroupFromSQL.exe
GroupFromSQL.py
TEST.rmtree
unifuzz64.dll
custom-RM-Python-config.ini_.sql

 

Rename the "RM-Python-config.ini" file to "original RM-Python-config.ini"

Rename the "custom-RM-Python-config.ini_.sql" file to "RM-Python-config.ini"

Now the Working Folder has these files-
ReadMe.txt
original RM-Python-config.ini
GroupFromSQL.exe
GroupFromSQL.py
TEST.rmtree
unifuzz64.dll
RM-Python-config.ini

Now we need to edit the RM-Python-config.ini file to make it work for your database.

Open Notepad and drag the RM-Python-config.ini file onto the open notepad window.

Find line 23. It should look like this-
SELECT 2361 AS C_StartPerson,

You want to carefully change the number 2361 to the RIN of the base person you want to run the utility on. The person whose cousins you want in the group. Say you want to use person with RIN =1
Edit the line to-
SELECT 1 AS C_StartPerson,

Don't change the spacing at the start of the line, just change the number.

NOW- double click the GroupFromSQL.exe file
A black console window will display and show the number of people in the group. The group name as specified in the ini file is-Cousins_spouses_spouseparents

Open the TEST database file in RM and confirm that the group membership is what you want.

 

 

Uploaded files:

Tom, explicit yes, perfect no!  Yes I executed the script 😉

I am going to try to get to Jerry's most recent suggestion and will let ya'll know.  It may not be until late tonight.

"Yes I executed the script "

When you execute a script that performs updates, SQLiteSpy will tell you how many records were updated. It's down in the lower left portion of the screen. Next time you run the script, make note of what it says about how many records were updated.

Also, make note of the fact that the script ends with AND COLOR4 = 0   That says that it will update the parents to blue only if the parents presently do not have a color. I like to include such features in my update scripts because it means that I can run the script a second time and see zero updates, telling me that the script is really done. And in the case of this particular script, it assures that it will not update somebody to blue who is already red or green due to intergenerational relationships between families.

So if things go well, the first time you run the script SQLiteSpy will tell you how many records were updated and if you run it again it should tell you that zero were updated.

Hey Jamie-

Any luck?

 

No I still cant get the parents to turn blue. But have not had time play around with it.   Does it matter which color set I use?  I’ve tried 2,3,4,5, and 6.  Color set 1 is in use.

I can't help with Jerry's proposed answer, but I can help with the answer I gave.

The post was very long, but i tried to make it step by step.  I didn't include the "turning on the computer" step, but it's close.

The color set doesn't matter. Just be sure to use the same one in RM and in the SQLite query. Remember that the color set numbers in RM and the color column numbers in the RM database are off by one from each other. And remember that the color column number appears more than one place in the SQLite query.

The best way to begin diagnosing the problem is to run the sub-query. There is little point in trying anything else until we know if the sub-query is producing the correct results in your database.

I got it to work!  I think I was using one colorset for the descendants red and descendants and spouses green and a different colorset for parents of spouses blue.  I used colorset 2, so changed your script to color1 and it worked perfectly.

Sorry for my confusion/error.  I am no longer seeing he read error, either.

THANKS SO MUCH!

PreviousPage 2 of 2