SofaJpl Demonstration Program (Visual Basic)

(These instructions are for Visual Studio Express 2013.)

In Visual Studio, click File, New Project.

From the installed Visual Basic templates, select Windows Console Application. In the Name field, enter SofaJpDemoVb. Click OK.

When the source code editor window opens, click Project, Add Reference. In the Reference Manager window, click the Browse button near the bottom. Navigate to your SofaJpl folder. Select SofaJpl.dll. Click Add. Click OK in the Reference Manager window.

From the folder that contains the SofaJpl installation, copy SofaWin32.dll, star_cat.vot, and star_names.vot to the Visual Studio folder where the executable will be created. It's something like Documents \ Visual Studio 2013 \ Projects \ SofaJplDemoVb \ SofaJplDemoVb \ bin \ Debug.

Note: you must copy the DLL by hand because it's a Win32 DLL, not a .Net DLL. An attempt to add it as a Reference would cause an error message.

Copy the Visual Basic source code and paste it into the source code editor so it replaces the code already there. In the #Const MAKE_EPHEMERIS = False preprocessor directive, change False to True. Edit the filenames near the beginning of the source code to match the names and locations in your system.

Click Debug, Start Without Debugging. The program will compile and display its output in a console window. Once started, there's no interaction with the user. During the run you may notice a momentay pause as the multi-megabyte ASCII ephemeris is written as a binary ephemeris. After the binary is created there's no need to repeat that work, so after the first run of the program change True to False in the preprocessor directive.

[up one level]

(page last modified 2018-08-29)