Wednesday, March 19, 2008

Tip: Change cut directory at "runtime"

As promised earlier I'll give you a few more tips on the things you can do with the XRKB.ini file.
One of the nice features is that you can make changes to the XRKB.ini file while Socrates are running. (I don't know if this is recommended usage by the Cincom Socrates team).

At my team we use the Cut command a lot; we cut .XRA knowledge modules to various folders depended on which branch of the project we're currently working on and we cut to running instances of our application.

The cut command remembers the location of where you did the last cut, so if you did a cut to c:\MyProjects\MyCuts\ the next time you cut a knowledge module, Socrates will suggest the c:\MyProjects\MyCuts\ folder as your cut location.

An investigation of the XRKB.ini file reveals this entry:

If we combine this information with the knowledge that we can make changes to the XRKB.ini file while Socrates is running, it opens up for a more dynamically way of controlling where to cut knowledge modules without navigating to the destination folder each time.

Let's create two copies of XRKB.INI; name them cut_to_projects_XRKB.ini and cut_to_current_branch_XRKB.ini, and place them at the same location as the original XRKB.ini. If you have installed Socrates with default settings it would be in C:\Program Files\Cincom\Socrates. (I recommend that you keep a backup copy of your XRKB.ini file somewhere safe.)

In the cut_to_projects_XRKB.ini file, change the lastCut entry to:

Similary for the cut_to_current_branch_XRKB.ini file, change the lastCut entry to:

Keep all other entries in the .ini files the same.

Now we just need a way to dynamically switch between the two new files. Create two .bat files; name them cut_to_projects.bat and cut_to_current_branch.bat.

copy "C:\Program Files\Cincom\Socrates\cut_to_projects_XRKB.ini" "C:\Program Files\Cincom\Socrates\XRKB.INI"

copy "C:\Program Files\Cincom\Socrates\cut_to_current_branch_XRKB.ini" "C:\Program Files\Cincom\Socrates\XRKB.INI"

These simple one-liners will copy one of the new .ini files into the original (or current) XRKB.ini file, where Socrates will pull the information of the wanted cut directory from. So before you want to cut a .XRA knowledge module the next time, just run the .bat file that will change your cut directory to the desired.

Bonus tip: You should not use the mouse to point-and-click to the cut command, instead use the built-in short-cut commands: Alt+F | U | RETURN

Tuesday, March 11, 2008

A warm welcome :-)

When I returned to the office after nine weeks (six spend backpacking in Thailand with wife and kids) of paternity leave (yes, that's the sort of things you can do in Denmark ;-) my colleagues had made the warmest welcome I ever received. This picture shows the entrance to APC Denmark yesterday morning:

There were Danish flags over the place, big hugs as I entered, and I got to use our managers parking spot near the entrance. To top this Susan even made cakes for our afternoon break :-)

I can't shake the feeling that they want me to do something in return, but it's sure nice to know you've been missed :-)

Thanks guys! Now I'll go back to work -- and promise that this blogs amount of smilies has been used for the rest of the year :-)