PSN-L Email List Message

Subject: RE: Quake data spreadsheet
From: Barry Lotz barry_lotz@.............
Date: Sat, 24 Oct 2009 10:21:36 -0700 (PDT)


Steve
I second the motion. What if a window came up and you could check boxes for=
 the header data you wanted to transfer?=20
Barry

--- On Sat, 10/24/09, Stephen Hammond  wrote:

From: Stephen Hammond 
Subject: RE: Quake data spreadsheet
To: psn-l@..............
Date: Saturday, October 24, 2009, 9:57 AM

Thanks Larry I'll print it off and play with this and see what I can do wit=
h
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 an=
d
enable us to do data analysis without a lot of effort to extract the header
and move it into a spreedsheet.=20

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.=20
=A0 The basic idea is to use the VBA Shell() function to call an external=
=20
program and pass the name of the file to be executed as a command line=20
argument.=A0 You could do this with most anthing, provided that the=20
program you pick expects command line arguments.=A0 Take note that some of=
=20
the lines in the code got folded to fit this e-mail.=A0 (Ie. DataFilePath=
=20
=3D.... , ExecutablePath =3D ... , ProcID =3D ...)

If you want to try it out I'd be happy to send you a copy of the whole=20
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=20
capability to take more than file name argument on the command line.=20
You can already select more than one file in the file open dialog box,=20
and if the files are compatable (same time parameters) they open=20
together, which allows direct comparison and manipulation of the two=20
files.=A0 If I use my spreadsheet to open more than one file, both open in=
=20
their own windows in Winquake, but any manipulations in one file window=20
do not affect the other.

Larry


Sub RunWinquake()
'
' Pass a selected event file to Winquake for execution.=A0 The
' event file is selected by selecting the event file name in
' the spreadsheet.
'
Dim ProcID
Dim DataFilePath=A0 =A0 As String
Dim ExecutablePath=A0 As String

DataFilePath =3D Environ("WQPATH") & Range("Notes!D20").Value &
Left(ActiveCell.Value, 2) & "\"
ExecutablePath =3D Environ("WQPATH") & Range("Notes!D23").Value

ProcID =3D Shell(PathName:=3DExecutablePath & " " & DataFilePath &=20
ActiveCell.Value, WindowStyle:=3DvbNormalFocus)

End Sub

Stephen Hammond wrote:
> This sounds like something I would like to try, do you mind sharing the
> excel macro?
> Steve Hammond=A0 PSN Aptos, CA
>=20
__________________________________________________________

Public Seismic Network Mailing List (PSN-L)


__________________________________________________________

Public Seismic Network Mailing List (PSN-L)

Steve
I second the motion. What if a windo= w came up and you could check boxes for the header data you wanted to trans= fer?
Barry

--- On Sat, 10/24/09, Stephen Hammond <shamm= on1@.............> wrote:

From: = Stephen Hammond <shammon1@.............>
Subject: RE: Quake data s= preadsheet
To: psn-l@..............
Date: Saturday, October 24, 2009,= 9:57 AM

Thanks Larry I'll print it off and= play with this and see what I can do with
it. Like many, I have a direc= tory full of event files and one of the thing I
would like to see winqua= ke do (hint-hint <<<Grin>>>) is have it add the
comple= te header directly to an existing exec spreadsheet in the winquake
subdi= r 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-requ= est@.............. [mailto:psn-l-request= @..............] On
Behalf Of Larry Conklin
Sent: Saturday, Octob= er 24, 2009 6:23 AM
To: psn-l@..............
Subj= ect: 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
prog= ram 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
=3D= ..... , ExecutablePath =3D ... , ProcID =3D ...)

If you want to try i= t 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 mor= e than file name argument on the command line.
You can already select m= ore than one file in the file open dialog box,
and if the files are com= patable (same time parameters) they open
together, which allows direct = comparison and manipulation of the two
files.  If I use my spreads= heet 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 o= ther.

Larry


Sub RunWinquake()
'
' Pass a selected e= vent file to Winquake for execution.  The
' event file is selected = by selecting the event file name in
' the spreadsheet.
'
Dim ProcI= D
Dim DataFilePath    As String
Dim ExecutablePath  As= String

DataFilePath =3D Environ("WQPATH") & Range("Notes!D20").= Value &
Left(ActiveCell.Value, 2) & "\"
ExecutablePath =3D En= viron("WQPATH") & Range("Notes!D23").Value

ProcID =3D Shell(Path= Name:=3DExecutablePath & " " & DataFilePath &
ActiveCell.Va= lue, WindowStyle:=3DvbNormalFocus)

End Sub

Stephen Hammond wr= ote:
> This sounds like something I would like to try, do you mind sh= aring the
> excel macro?
> Steve Hammond  PSN Aptos, CA>
__________________________________________________________

Publ= ic Seismic Network Mailing List (PSN-L)

To leave this list email PSN-L-REQUEST@.............. with
the b= ody of the message (first line only): unsubscribe
See http://www.seismicnet.c= om/maillist.html for more information.

_________________________= _________________________________

Public Seismic Network Mailing Lis= t (PSN-L)

To leave this list email PS= N-L-REQUEST@.............. with
the body of the message (first line= only): unsubscribe
See http://www.seismicnet.com/maillist.html for more
[ Top ] [ Back ] [ Home Page ]