IadsConfigInterface.dll and VBScript

129 views
Skip to first unread message

Aaron Wheeler

unread,
Aug 5, 2011, 3:08:48 PM8/5/11
to IADS
I'm trying to manipulate the threshold level via VBScript using the
IadsConfigInterface.dll. So far this is what I've come up with:

****
Option Explicit

Dim Args
Dim Iads
Dim Threshold
Dim CurrentLevel

Set Args = WScript.Arguments
Set Iads = CreateObject("Iads.Application")
Set Threshold = CreateObject("IadsConfigInterface.Threshold")

CurrentLevel = Threshold.Level
MsgBox "The current threshold level is: " & CurrentLevel,0,"Threshold
Level"
****

The code errors at the 'Set Threshold..." line. The Microsoft VBScript
runtime error is "ActiveX component can't create object:
'IadsConfigInterface.Threshold'. The error code is 800A01AD. I can't
figure out why I'm getting this error, or how to fix it.

I'm using VBSedit to write the code in. At first I wasn't able to see
IADSCONFIGINTERFACELib in the object browser, but after successfully
registering the .dll, I can now see it there, but I still get the
runtime error.

Thanks for the help,
Aaron

Dale Jones

unread,
Aug 5, 2011, 3:53:55 PM8/5/11
to IADS
Hi Aaron,

I was able to run your script without any errors, so nothing is wrong
with the code itself. My suggestion would be to open up your Windows
Task Manager and look for any currently running instances of Iads.exe.
If you find any, terminate them and retry the script.

One question, are you connecting to an IADS client that is already
running?

When you run your script, the call to CreateObject("Iads.Application")
either connects to a currently running IADS client process, or spawns
a new one if it doesn't find one. When the script terminates, it
doesn't kill that IADS.exe, so it'll keep running in the background.
So what I think might be happening is that you tried running the
script once before you had the IadsConfigInterface DLL registered, it
spawned a new IADS.exe, and the script failed because the
IadsConfigInterface DLL wasn't registered. You then registered the
DLL, but when you ran the script again it reconnected to the old
Iads.exe that was already running before the DLL got registered, and
failed again. That's my theory anyway. ;)

Try killing any rogue Iads.exe processes that might be running already
and retry the script...see if that helps.

Dale Jones
Symvionics, Inc.
IADS Software Developer
(661) 277-4787

Adam Chant

unread,
Aug 5, 2011, 3:59:37 PM8/5/11
to ia...@googlegroups.com
Aaron,
What exactly are you trying to accomplish here? Is this something you want
to do off line or while an IADS Client is running?
Depending on what you would like to do you may only need to:
CreateObject("Iads.Application")
Or
CreateObject("IadsconfigInterface.IadsConfig")
But not necessarily both.

I suspect that just the Iads.Application work and you can use an SQL style
query to get and set the values to the tables you are trying to manipulate.

That being the case try

Set IADS = CreateObject("iads.application")
Set config = iads.Configuration

Then you can use

config.SqlQuery(query)

to get and set the thresholds from the thresholds log.

Let me know if that will work for you.

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

****
Option Explicit

--
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.

Aaron Wheeler

unread,
Aug 5, 2011, 4:32:27 PM8/5/11
to IADS
I'm trying to set the threshold level to "iadsNoThreshold". This will
be while IADS is running...

The big picture:
I'm trying log all threshold exceedances of all parameters without
having to click to acknowledge the exceedance in IADS every time. My
understanding (which may be wrong), is that when IADS realizes a
threshold has been exceeded, it highlights the parameter/ dashboard
which lets the user know something happened, and logs it. But, it
won't log another exceedance of that parameter until you click. From
reading the documentation for IadsConfigInterface, I think that the
threshold level has 3 different levels. When my VBScript, which is not
complete, notices that the level is not "iadsNoThreshold" it will
change it back so that the user doesn't have to click-to-acknowledge
in IADS. This way we can play through data at 10x and not have to
babysit IADS. Maybe I'm approaching this incorrectly here...

This script would essentially replace the human user, so a human
doesn't have to click-to-acknowledge after every exceedance.

I was playing around with CreateObject("Iads.Application") because
that was the only thing I could get to show up in VBSedit's object
browser. It also lets me view the classes? and methods? in the object
viewer so I can try to figure out my problem. I'm not a programmer so
I don't know the terminology. I just didn't remove that line of code
yet.

By "set a threshold", do you mean set the actual threshold value for a
parameter, or to set the threshold level to one of three options...0)
iadsNoThreshold, 1) iadsWarning, 2) iadsAlarm? The later is what I'm
trying to accomplish. Are these three levels set per parameter, or can
it be set globally?...sort of like clicking-to-acknowledge is a global
action that acknowledges any/all exceedances with a single click?

Thanks,
Aaron

Aaron Wheeler

unread,
Aug 5, 2011, 4:35:54 PM8/5/11
to IADS
Another note about registering the dll. I'm working on a XP x64
machine in which IADS is installed in the Program Files (x86) folder.
I copied the dll to the IADS directory and registered it with both the
32 and 64 bit regsvr32.exe. I'm not sure if this is important or not,
just figured it was worth mentioning.

Aaron

On Aug 5, 12:59 pm, "Adam Chant" <a...@iads-soft.com> wrote:

Adam Chant

unread,
Aug 5, 2011, 5:58:25 PM8/5/11
to ia...@googlegroups.com
Aaron,
Run the following script off to the side and see how this works for you.

**************
'Create IADS Object

Set Iads = CreateObject( "Iads.Application" )

'Start a timed loop to reset the threshold at the sleep time below
While True
'Go through all analysis windows in the active desktop
'and set the DataDisplay.Selected = False
'By deselecting the display it will reset the threshold
Set Aws = Iads.ActiveDesktop.AnalysisWindows
For Each Aw In Aws
Set DataDisplays = Aw.DataDisplays
For Each DataDisplay In DataDisplays
DataDisplay.Selected = False
Next
Next
'Sleep timer in ms
WScript.Sleep 5000
Wend
**************

By doing this you can watch the threshold log and see that it will add a new
entry at the rate of no more than 1 every 5 seconds. By adjusting the sleep
time it will catch more instances of the parameter being past the threshold,
but at the same time include the current state as a new instance if it is
beyond the threshold.

If that doesn't work for you then we may have to go about this another way
through a MatLab script using iadsread.

Ultimately IADS currently doesn't implement a method for automagically
resetting the thresholds so implementing it is difficult to pin down without
user intervention.

Aaron Wheeler

unread,
Aug 8, 2011, 2:42:14 PM8/8/11
to IADS
Adam,

Thanks for the script, it works great. Since I want to play back at
10x, I'll just reduce the sleep time accordingly. This can definitely
work if it's the only option.

It would be nice if it didn't log a single exceedance multiple times.
But It sounds like there isn't a good way to achieve the log-once-per-
exceedance goal easily without some significant work in VBScript or
Matlab. How involved do you think the Matlab script would be?

Aaron

Tran, Quincy Q CTR The Boeing Company, H201

unread,
Jun 5, 2012, 5:37:17 PM6/5/12
to ia...@googlegroups.com

Hi Adam,

I'd like to check with you if we ever get a way to have the heading of the aircraft in the aircraft model behave like that of the compass: heading N for 0 degree, S for 180, E for 90, and W for 270 degrees.

Thanks,
Quincy

Adam Chant

unread,
Jun 5, 2012, 7:59:40 PM6/5/12
to ia...@googlegroups.com
Quincy,
As far as I know the property Heading in the Model Control is set-up as you
have described. Is it a specific model in question that is not responding as
expected?


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

-----Original Message-----
From: ia...@googlegroups.com [mailto:ia...@googlegroups.com] On Behalf Of

Tran, Quincy Q CTR The Boeing Company, H201

unread,
Jun 6, 2012, 7:17:55 AM6/6/12
to ia...@googlegroups.com
I am using F18ModelControl; however, the Heading seems not to point correctly in the same direction as shown by Heading value.

Thanks so much for your prompt response,
Quincy

Tai Ward

unread,
Jun 6, 2012, 1:27:59 PM6/6/12
to ia...@googlegroups.com
Quincy,

I just check the F-18 model control. It appears to be working correctly.

There are 2 parameters in our 3-D model controls that might get confused:
Yaw and Heading.

The "Yaw" property is used to indicate the direction that the aircraft is
pointing. In other words, the direction in which the 3-D aircraft model is
pointing.

The "Heading" property is used to indicate the direction that the aircraft
is moving. This is represented by the yellow pointer between the compass
ring and the red side slip ring, and has its value show in the upper left
hand corner.

Tai

Tran, Quincy Q CTR The Boeing Company, H201

unread,
Jun 7, 2012, 4:47:35 PM6/7/12
to ia...@googlegroups.com
Hi Tai and Adam,

Thank you for your help with info of the "Yaw" property; however, when I assign "heading" to the "Yaw" from property list, the F-18 Model Control seems to always point to a fixed direction, which is the East (Right side) of the screen while the "HorizonGrid" rotates. I hope IADS has an option to let the "HorizonGrid" be fixed with the 0 degree pointing to the N (North direction) and then let the aircraft rotate accordingly. If you have been successfully getting this setup, please share.

Thanks,

Tai Ward

unread,
Jun 7, 2012, 4:59:48 PM6/7/12
to ia...@googlegroups.com
Quincy,

It sounds like you have it set up in "chase" view mode. There is a property
called "ShowChaseView", that lets you toggle whether the horizon is still
and the aircraft rotates, or if the aircraft remains static and the horizon
rotates. By default "ShowChaseView" is set to False. Sounds like yours is
set to True. Pressing in the C key on the keyboard toggles it.
Reply all
Reply to author
Forward
0 new messages