PSN-L Email List Message
Subject: RE: Quake data spreadsheet
From: "Stephen Hammond" shammon1@.............
Date: Sat, 24 Oct 2009 09:57:06 -0700
Thanks Larry I'll print it off and play with this and see what I can do with
it. Like many, I have a directory full of event files and one of the thing I
would like to see winquake do (hint-hint <<>>) is have it add the
complete header directly to an existing exec spreadsheet in the winquake
subdir via a command key in winquake. I think this would be really handy and
enable us to do data analysis without a lot of effort to extract the header
and move it into a spreedsheet.
Thanks a lot-- Steve Hammond
-----Original Message-----
From: psn-l-request@.............. [mailto:psn-l-request@............... On
Behalf Of Larry Conklin
Sent: Saturday, October 24, 2009 6:23 AM
To: psn-l@..............
Subject: Re: Quake data spreadsheet
Hi Setephen,
Below is a copy of the macro, cut & pasted right out of the spreadsheet.
The basic idea is to use the VBA Shell() function to call an external
program and pass the name of the file to be executed as a command line
argument. You could do this with most anthing, provided that the
program you pick expects command line arguments. Take note that some of
the lines in the code got folded to fit this e-mail. (Ie. DataFilePath
=.... , ExecutablePath = ... , ProcID = ...)
If you want to try it out I'd be happy to send you a copy of the whole
thing, along with a little file of "user notes" that I put together.
One little Winquake enhancement I'd love to see (hint, hint) is the
capability to take more than file name argument on the command line.
You can already select more than one file in the file open dialog box,
and if the files are compatable (same time parameters) they open
together, which allows direct comparison and manipulation of the two
files. If I use my spreadsheet to open more than one file, both open in
their own windows in Winquake, but any manipulations in one file window
do not affect the other.
Larry
Sub RunWinquake()
'
' Pass a selected event file to Winquake for execution. The
' event file is selected by selecting the event file name in
' the spreadsheet.
'
Dim ProcID
Dim DataFilePath As String
Dim ExecutablePath As String
DataFilePath = Environ("WQPATH") & Range("Notes!D20").Value &
Left(ActiveCell.Value, 2) & "\"
ExecutablePath = Environ("WQPATH") & Range("Notes!D23").Value
ProcID = Shell(PathName:=ExecutablePath & " " & DataFilePath &
ActiveCell.Value, WindowStyle:=vbNormalFocus)
End Sub
Stephen Hammond wrote:
> This sounds like something I would like to try, do you mind sharing the
> excel macro?
> Steve Hammond PSN Aptos, CA
>
__________________________________________________________
Public Seismic Network Mailing List (PSN-L)
__________________________________________________________
Public Seismic Network Mailing List (PSN-L)
[ Top ]
[ Back ]
[ Home Page ]