Triggering "Save Image" from configuration file

36 views
Skip to first unread message

Sherman, Paul

unread,
Jan 25, 2012, 1:12:02 PM1/25/12
to ia...@googlegroups.com
I'm trying to automate a call to "Save Image" (from the Analysis
Window Right-Click Menu Option) dependant on the time check
in the Config file. Is there a way to call "Save Image" from the
Config file ?

James Bretz

unread,
Jan 25, 2012, 2:59:17 PM1/25/12
to ia...@googlegroups.com
Hi Paul,

Is there any reason why you can't just use the "GotoTime" dialog or jump to
the time of an event marker and then snapshot the image by hand? Normally,
you would just simply "jump" to that specific time and then do a screenshot
by hand. Does your window need to run for a long time in order to build up
some calculation or otherwise?

There is a way to invoke a Save Image, but it involves creating a VB
script.... I just wanted to make sure we aren't checking the easiest routes
first.

Jim

--------------------------------------------------
From: "Sherman, Paul" <pshe...@smartronix.com>
Sent: Wednesday, January 25, 2012 10:12 AM
To: <ia...@googlegroups.com>
Subject: [IADS] Triggering "Save Image" from configuration file

> --
> You received this message because you are subscribed to the Google Groups
> "IADS" group.
> To post to this group, send email to ia...@googlegroups.com.
> To unsubscribe from this group, send email to
> iads+uns...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/iads?hl=en.
>

Sherman, Paul

unread,
Jan 25, 2012, 3:09:57 PM1/25/12
to ia...@googlegroups.com
James :

I've been requested by one our Captains to add a toggle button that, if toggled on,
requests a start and stop time, and captures printable pages like "Save Image" does,
in the time window. Any hints about the VB script will be appreciated.
- Thanks,
Paul

________________________________

Adam Chant

unread,
Jan 26, 2012, 2:08:35 PM1/26/12
to ia...@googlegroups.com
Paul,
Could you help me better understand what you are looking for so I can
provide you the best path to a solution.

There are a number of semi-automated functions that may do what you are
describing.
You can directly execute a screen image save by pressing Ctrl+Shift+F1.
Also to get the exact time range you want into a strip chart go to the Test
Points Logs and select the Clock with an Arrow icon "Goto Time Of Selected
Row then Advance to Next Row."
That will adjust the range of the strip chart to the start and stop time
found in the test point. Then press Ctrl+Shift+F1 to Save the image.


Adam Chant
Symvionics, Inc.
IADS Application Engineer
(661) 273-7003 x 210

Sherman, Paul

unread,
Jan 27, 2012, 10:46:34 AM1/27/12
to ia...@googlegroups.com
Adam :

I've got a Captain that is looking to go back in time. Basically, he looking
for the ability to capture multiple sequencial strip charts, print them out and
place them end to end creating an old fashion strip chart. My first take on the
situation was to call "Save Image" at intervals so that the right end of a stripe
chart ends and the left end, of the next strip chart, displays the data for the next
increment. Any suggestions will be appreciated.

- Paul

________________________________

Adam Chant

unread,
Jan 27, 2012, 11:10:27 AM1/27/12
to ia...@googlegroups.com
Paul,
What you are describing would be considered post test data mining and we
currently have no mechanisms in place to support that directly. My previous
suggestion of using Test Points and Print Screen to BMP would be the best
solution requiring the least input.

Another option could be to export all of the time slices as CSV, copy them
to 1 continuous CSV, then import them into the PTDS as a single continuous
stream. Time would be irrelevant (as it would be inaccurate), but you could
show all the data on the stripchart by selecting the "all" button in the
Analysis window. Then a print capture of that would produce your intended
results.

James Bretz

unread,
Jan 27, 2012, 12:29:56 PM1/27/12
to ia...@googlegroups.com
Hi Paul,

Another question.

Does this captain want this tool for the control room (real-time) or in post
test? Likewise, Is there a reason why he doesn't want to use the Iads client
and just grab the scrollbar on the AnalysisWindow and scroll back into the
time range?

Iads was specifically designed to go back in time at any point in the test.
So, as you can see, we're all very curious why he wants this capability,
because it's already an integral part of the Iads client (and as simple as
moving a scrollbar). I keep thinking we're missing something obvious.....

Perhaps he simply wants a printout like the old style paper stripcharts and
he doesn't prefer to use the client to review data? Or maybe he's trying to
send the data to someone that doesn't have the Iads client?

We could do this with a script, but the output will be rather sloppy and
won't line up nicely as a continuous scrolled printout/capture... I just
want to make 100% sure that we're not missing something obvious (again)
before we start building a script. If we knew the background of why he
wanted the script, we might be able to suggest a better (cleaner) solution,
Jim

James Bretz

unread,
Jan 27, 2012, 11:11:32 PM1/27/12
to ia...@googlegroups.com
Paul,

My bad. I didn't see the "print them out and place them end to end creating
an old fashion strip chart". Ok, now I understand ;)

Here is a VB script that will almost accomplish what you want. The missing
part is the GUI portion, but I think Adam can help you in this area. He's
found out how to build forms in VB script. Adam, can you help Paul? See the
portions of the script that say "TODO: Need to query this string from a XXX
element"

Basically, just copy the script below into a file named
SequentialSnapshot.vbs (whatever.vbs) and double click on it. Before you
double click on the file and execute it, modify the StartTime.TimeString =
"001:00:10:00.000" and EndTime.TimeString = "001:00:10:30.000" to be the
time range desired in the format DDD:HH:MM:SS.MS. Choose a fairly small
range or this thing will fill up your hard drive quickly!

Adam can help you build a GUI so the user can input the Start/Stop time
strings... and you also might be able to convert the bmp files to jpg after
saving to disk to keep the footprint low, etc.

I hope this helps,
Jim


''''''''''''''''''''''''''
'Connect to Iads
Set Iads = CreateObject( "Iads.Application" )

'Get the currently active AW (the window with focus)
Set Aw = Iads.ActiveAnalysisWindow

'Assuming the StripCharts are set to length of 120mm (default), compute the
'amount of time displayed in a StripChart based off the chart speed of AW
ChartLengthInSeconds = 120.0 / Aw.ChartSpeedMMPerSecond

'Create an Iads time object and set it to the start of the time range
'TODO: Need to query this string from a gui element
Set StartTime = CreateObject( "IadsTime.IadsTime" )
StartTime.TimeString = "001:00:10:00.000"

'Create an Iads time object and set it to the end of the time range
'TODO: Need to query this string from a gui element
Set EndTime = CreateObject( "IadsTime.IadsTime" )
EndTime.TimeString = "001:00:10:30.000"

'Create a directory for the output bitmap files
OutputPath = "C:\IadsSnapshot\"
set filesys = CreateObject("Scripting.FileSystemObject")
If Not filesys.FolderExists(OutputPath) Then
Set newfolder = filesys.CreateFolder( OutputPath )
End If

'Create a snapshot of the window at even time intervals between start/stop
Num = 1
While ( StartTime.IsLess(EndTime) = True )

'Direct the AW to jump to the directed time
Aw.CurrentTime = StartTime

'Create the snapshot bitmap name
Name = OutputPath & "IadsSnapshot" & Num & ".bmp"
Num = Num + 1

'Snapshot the AnalysisWindow
Aw.SaveAsBmp Name, False

'Debug MsgBox "Snapshot of Time " & StartTime.TimeString

'Advance the time to the next frame based off of our chartlength
calculation
StartTime.AdvanceTime 1, 1.0/ChartLengthInSecondsWend
''''''''''''''''''''''''''''''

--------------------------------------------------
From: "James Bretz" <j...@iads-soft.com>
Sent: Friday, January 27, 2012 9:29 AM

James Bretz

unread,
Jan 29, 2012, 11:59:03 AM1/29/12
to ia...@googlegroups.com
Looks like Google induced a formatting error on my last post.

The last couple of lines of the script should be:

'Advance the time to the next frame

StartTime.AdvanceTime 1, 1.0/ChartLengthInSeconds
Wend

If you plan to do more scripting, you might want to invest in a program
called VBSEdit. It makes building VB
scripts easy and saves a lot of time,
Jim

Sherman, Paul

unread,
Jan 30, 2012, 1:43:55 PM1/30/12
to ia...@googlegroups.com
Jim :

Here's the response that I got to your questions. The strip charts will be used
in a post test environment. The reason that they want physical strip charts is that
we have many groups (international and national) that don't have access to an IADS
system. So, the physical strip charts are the only vehicle available for them to regain
the lessons learner from the mission.

- Paul

________________________________

James Bretz

unread,
Jan 30, 2012, 2:15:47 PM1/30/12
to ia...@googlegroups.com
Paul,

Thanx for the extra info ;) It makes sense.

Just FYI, Iads is a commercial product available worldwide.... so if the
other groups ever wanted to have the same capability as you do to review the
data (or even play it back like a simulated mission), just point them to our
website at http://iads.symvionics.com/

Adam is working on the GUI aspect of the script right now. It shouldn't be
long,
Jim


--------------------------------------------------
From: "Sherman, Paul" <pshe...@smartronix.com>

Sent: Monday, January 30, 2012 10:43 AM

Adam Chant

unread,
Jan 30, 2012, 7:26:36 PM1/30/12
to ia...@googlegroups.com
So we often write scripts in vbscript to execute tasks within IADS, but when
you want to include a GUI aspect VB can be a little too much work. So
Microsoft has a user side version of HTML documents called HTA. The nice
part is that most of the security limitations of web pages run from a
browser are removed for HTA.
Basically what it is made up of is vbscript in a HTML document.
We normally use vbsedit or htaedit to edit the file as the intellisense
helps along the process, but if you know html and vbscript the file can be
created in notepad.
I attached a simple HTA that when renamed to SaveImageTimeSlice.hta will
provide a simple GUI for Time input and save directory.
SaveImageTimeSlice.txt
Reply all
Reply to author
Forward
0 new messages