Adam Chant
Application Support Engineer
Symvionics, Inc
> --
> 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.
>
To do this with excel it would take a little more work, but it's not out of
the question.
HTA could be used to build a GUI for a VB script that does the same thing by
watching or querying test points.
Then it fires off a Data export group to excel and after that is complete
runs another script on the data.
Last but not least another option would be adding a macro of your script to
the template Main workbook in excel. That will make it available for every
instance of excel and then it can be triggered with a simple keystroke after
the data is populated.
Also if you are looking for a way to do Derivative or Integrate our
Stripchart tool box has those functions in it.
Right-click in the Analysis Window title bar.
Select Add In Tools > Stripchart Toolbox.
Freeze the Analysis Window.
Pick points in the Stripchart to select a block of data.
Click the desired Toolbox button.
If all else fails and the script you are trying to run is generic enough,
could be used for other programs and not proprietary we may be inclined to
integrate it into IADS in a future release.
I hope these are some solutions for your situation.
Adam Chant
Symvionics, Inc.
IADS Application Engineer
(661) 273-7003 x 210
--
You received this message because you are subscribed to the Google Groups "IADS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/iads/-/ccvJDN1UsUoJ.
As for being able to "choose" what actions are to be executed in Excel, this
is another matter. It would be fairly easy to execute a macro by name, but
being able to "do anything" would probably mean firing off a script. We
could add the ability to arbitrarily fire off a VB script after export. I'll
add this to the list as well.
For the time being, you could use the ActionObject to fire off the Excel
automation script after the export... although the user would have to push a
button on the window to initiate it. Not the best, but better than nothing.
Jim
--------------------------------------------------
From: "Emil Crisan" <cem...@gmail.com>
Sent: Saturday, October 29, 2011 6:25 PM
To: <ia...@googlegroups.com>
Subject: Re: [IADS] Re: Automated way to select points that then brings up
an Excel Chart
> Hi all,
Emil
I was just looking through the code the other day and found the option to
fire off an Excel macro.
\\ExcelStatementToRun=MacroNameToFire,OptionalArg1,OptionalArg2,OptionalArg3
If you add this to the PropertyBag of the DataGroup, it will fire off a
Macro by the name in the first argument. I tested without any optional
arguments and it seems to work ;)
I'll make sure this get's into the documentation,
Jim
--------------------------------------------------
From: "Emil" <cem...@gmail.com>
Sent: Monday, October 31, 2011 2:21 PM
Emil and I worked on the issue of automating Excel through a DataGroup
export offline, so I thought I'd post the results:
1) In order to fire off a Macro upon DataGroup export, you need to first get
the Macro into Excel.
The easiest way we found is to put the Macro into the 'personal.xlsm' file
in the XLSTART directory (C:\Program Files\Microsoft Office12\XLSTART).
Excel will load this file upon startup automatically.
Below is a link for a tutorial of this process. Make sure you set the
workbook to "hidden" as the tutorial suggest, otherwise the exported data
will go into the personal.xlsm file (not good.. we want it to create a new
workbook). One more thing that the tutorial actually misses is that you need
to save the workbook as a "macro enabled workbook" (xlsm file). This is
required by the newer versions of Excel.
I created a macro named Plot as follows, saved the personal.xlsm file into
the XLSTART directory, and exited Excel:
Sub Plot()
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'MyDataGroup'!$B:$B")
ActiveChart.ChartType = xlLineMarkers
End Sub
2) Go to the DataGroup table in Iads and add the following entry to the
PropertyBag column of the DataGroup you wish to perform the Macro upon
export. In my example, I executed the newly added 'Plot' macro:
\\ExcelStatementToRun=personal.xlsm!Plot
Notice the scope declaration 'personal.xlsm!' in front of the macro name
'Plot'. You need to add this or the Macro will not be found when executed
from a DataGroup.
3) Run Excel from the Microsoft Start menu *before* exporting any DataGroup
that fires a Macro from Iads.
When I exported the DataGroup, Iads executed Excel and put in the data, but
the Macro failed. It appears that when you add a macro to the personal.xlsm
file, it will load each time you run Excel from the Start menu, but it
*won't* load if you let Iads execute Excel from scratch. The bottom line is
that I had to start Excel 'by hand' from the start menu, and then perform
the export (I.e. let Iads attach to an already running Excel). It seems
there might be some security operation that doesn't allow macros or personal
sheets to load from the automation interface (the way Iads starts Excel).
4) Export the DataGroup
Data fills the sheet and the Macro is fired off (finally!)
So to recap:
A) Setup your Macro in a file called personal.xlsm (save it as a macro
enabled workbook)
B) Create a DataGroup at add
\\ExcelStatementToRun=personal.xlsm!YourMacroName
C) Run Excel from the Start menu
D) Export the DataGroup from Iads
Hope this helps,
Jim
--------------------------------------------------
From: "James Bretz" <j...@iads-soft.com>
Sent: Friday, February 10, 2012 4:43 PM