Saturday, April 11, 2009

Happy Easter

Here it is, Easter Eve, and I am on the computer...

All the festivities are over with and everyone is in bed. We had fun with our eggs, and I thought I would show what I can accomplish with a total lack of artistic ability (but with plenty of enthusiasm).


This is the Santa Fe Super Chief modeled in Egg... I am not sure the scale. But notice the accurate War Bonnet paint scheme and authentic looking Vista Dome car.


I thought the F7A #31A was particularly well done.

There you have it. I really pushed my skills to limit this time. And yes, I have had trains on my mind a lot lately. Everyone around me is about sick of it, so I had to enlarge my audience.

Happy Easter!

Train Spotting

The BNSF Railroad goes through town here. I have watched as locomotives have changed colors and names. Lately, I have thought I should take pictures to preserve this current time. Also, I have become aware of the fact that I seem to see a particular kind of train more than others. Coal. Long coal trains stop beside the highway. I believe they are waiting to unload at the power plant. I always regret not having a camera with me because it would be easy to just snap some nice pictures as the trains sit there.
Today I planned to do just that. Just drive down the highway and take some gorgeous shots of a long coal train just sitting there in all its splendor.
There were certain flaws in my plan... First, the weather was not lovely. Then, when we got down there, the tracks were a bit... trainless. After we had turned around to head back, a train approached, and I finally got my pictures. Here they are:







So... the pictures are terrible. When taking pictures of trains, there are some things that are important. You want to capture the type of car or engine. You want to see the numbers. And you want to see what color scheme they are painted with. My pictures amazingly captured none of that.

I laughed at just how horrible they were. It seemed that I had put a bit of effort into a complete waste. However, I have learned some things.

1. If it's raining, leave the camera at home.
2. Have the camera in your lap ready to take pictures in case the train is moving.
3. When you are in a car on the highway and the train is traveling in the opposite direction and not slowing down, it's probably more important to work on turning the car around.
4. Make sure the camera is set to normal color mode before you start taking pictures.

Anyway, I hope someone else sees the humor in all this.

Thursday, April 9, 2009

Model Railroading and the 0-Budget Layout

I have been meaning to post about this for a while, but just haven't. The context is this: Last year my family moved into a new home. The home included a large unfinished basement (a big selling point for me). My wife and I struck a deal. She could have the upstairs office and I could have the basement.
So, as we were getting ready to close on the house, it occurred to me that I would finally have a place to build a real model train layout.
Since then, I have been somewhat obsessed with trains. Sometimes more than others. In the early time (before we even moved in) certain realities were very clear. Even though I had space, I had no extra cash. All the money was going into the new house. However, I also had some materials left over from fixing up the old house. I also had some old track and some old trains and car. I decided to "make do" and my 0-Budget Layout was born!
I am not going to go into details now, but I have pictures that I would like to post later.
I made some discoveries along the way. The first is that a budget of $0 has not been achieved, but it is still pretty low. Also, I found that my brain did allow me the purchase of some new trains (mostly cars with a new loco for my birthday). That sort of snowballed into buying things to fix up my old stuff. So, I have spent more than I should, but technically, it wasn't on the layout. ;) (rationalization, I know)
I do continue on my quest to build a layout on recycled materials. However, soon I am going to allow myself 1 exception. I am going to purchase a new power system. For those who know, power is expensive and hard to make do with. Plus, I am changing the type of power I am going to use from DC to DCC. This is a big change and an expensive one. It is also what I will be using on the new layout. Plus it has some pretty good gadget value. So, I am going to upgrade power now which totally blows my 0 budget. But there are still many areas to explore and I hope more on this will follow in future posts.

InstallShield Merging Web Sites (Correction)

I found that the redirection in the command line wasn't working correctly. So, I created a DOC batch file to wrap the command line. The InstallScript changes to this:


//---------------------------------------------------------------------------
// GetNextWebSiteNumber
//
// This function returns the next available web site number based on entries
// for current web sites in IIS. The admin script adsutil.vbs is used the
// query current web sites.
// If there is an error, the function returns -1.
//---------------------------------------------------------------------------
function GetNextWebSiteNumber()
NUMBER nResult;
NUMBER nvTempWebSiteNumber;
NUMBER nWebSiteNumber;
NUMBER nvFileHandle;
NUMBER nNumPos;
STRING szProgName;
STRING szProgParams;
STRING szFileDir;
STRING szFileName;
STRING svLine;
STRING svSiteNum;
STRING svNumStr;
begin
nvTempWebSiteNumber = -1;
nWebSiteNumber = nvTempWebSiteNumber;
szFileDir = SUPPORTDIR;
szFileName = "websiteenum.txt";

//
// Run the adsutil.vbs script and get all the web sites. Put the
// output into a file. NOTE - InstallShield doesn't pass the
// redirect through correctly, so the adsutil needs to be called
// from a batch file so the output can be captured.
//
szProgName = WINDIR^"system32\\cmd.exe";
szProgParams = " /c " + SUPPORTDIR^"CmdOutToFile.bat \"" + WINDIR^"system32\\cscript.exe C:\\inetpub\\AdminScripts\\adsutil.vbs ENUM /p W3SVC\" \"" + szFileDir^szFileName + "\"";
StatusBox("Running " + szProgName + szProgParams, DEBUG);
if (LaunchAppAndWait(szProgName, szProgParams, WAIT) >= 0) then
//
// Open the file with the web sites and find the number
// of the last one.
//
OpenFileMode(FILE_MODE_NORMAL);
nResult = OpenFile (nvFileHandle, szFileDir, szFileName);
if (nResult = 0) then
while GetLine (nvFileHandle, svLine) = 0
if (svLine % "W3SVC/") then
StrSub(svSiteNum, svLine, 8, StrLengthChars(svLine) - 9);
StrToNum(nvTempWebSiteNumber, svSiteNum);
if (nvTempWebSiteNumber > nWebSiteNumber) then
nWebSiteNumber = nvTempWebSiteNumber;
endif;
endif;
endwhile;
CloseFile(nvFileHandle);
nWebSiteNumber = nWebSiteNumber + 1;
else
NumToStr(svNumStr, nResult);
StatusBox("Could not open the web site enumeration file " + szFileDir + szFileName + " (Result = " + svNumStr + ")", DEBUG);
endif;
endif;
return (nWebSiteNumber);
end;


Here is the DOS Batch file:

::@echo off
::----------------------------------------------------------------------------
:: CmdOutToFile.bat
::
:: Wrap a command that redirects output to a file. This is to allow the
:: output to be captured when run from a program that doesn't allow this, such
:: as InstallShield.
::
:: Parameters:
:: Parameter 1 = The command to run.
:: Parameter 2 = The file to redirect output to.
::
::----------------------------------------------------------------------------

:: Get the command line
set cmdLine=%1
set outputFile=%2

:: Remove quotes
set cmdLine=%cmdLine:"=%
set outputFile=%outputFile:"=%

:: Run the command
%cmdLine% > %outputFile%


BTW, I noticed that the blogger doesn't scroll horizontally or widen. However, the text is there, so you can copy and paste it into notepad to see it all. I prefer showing it this way as the whitespace is preserved. If I let HTML format it, it strips all that and makes it unpleasant. I will work on finding alternatives.