02-01-2016 10:23 AM
Hello
I am curious if there is away to add additional functions to DIAdem.
For example I have an external Test processing system which creates and stores all of our test requests. The database has some built in features which allow us to search and retrieve test information though excel using VB. An Add - In needs to be installed to excel before these functions became usable.
My question is; Is there a way to add this add in into DIAdem?
I am using DIAdem advanced 2015 32 bit.
Thanks
Solved! Go to Solution.
02-01-2016 11:05 PM
Hello Tim,
There are several ways to tackle this issue. One would be too add the access to your test request database, another would be the extract the information using the DataFinder and DataPlugins and adding it to each test file - thus adding meta data top each test file and making it searchable from DIAdem directly.
The best way to tackle this is probably through a conversation that will allow us to discuss details. Feel free to email me here:
otmar DOT foehner AT ni DOT com
and I will set up a call with you to discuss this in more detail. I feel that this question would probably take excessive time to tackle through forum posts.
02-02-2016 03:58 AM
If your Excel addin is an ActiveX Componet you can access it in VBS by using CreateObject.
Attention: The bitness(64/32bit) of DIAdem and the ActiveX must be equal.
02-02-2016 06:22 AM
Andreas
Please eloborate. I have used the create object command to execute MATLAB applications as well as open excel files, how would I run an excel addin through the creat object command?
Otmar I sent you an email. Looking forward to speaking to you.
02-02-2016 06:29 AM
If it is a real excel addin CreateObject won't do the job. I was just hoping it is an activeX component instead of an Read Excel Addin. So I was leading you to an dead end. Please contact Otmar with the given information in his post.
02-02-2016 06:48 AM
Thanks nontheless I tried the following code without success.
The addining function prototype in excel requires the test name and the data characteristic.
The add in is accessed in excel by using the "DataAddInFunction.GetTestInfo(test_name, "Characteristic")
Dim excel, thisTestName, engNum
thisTestName = "123456"
Set excel = CreateObject("Excel.Application") excel.Visible = True engNum = excel.DataAddInFunction.GetTestInfo(thisTestName, "Eng Track Num") excel.Quit Set excel = Nothing
02-09-2016 06:00 AM
I have been granted access to my test database and I have been able to succesfully find test information as needed.
Howere there is an extensive amount of code written in VBA to handle DB interaction. I was wondering if there is a method that would allow me to access macros and VBA programs through DIAdem so I can simply reuse this existing code as opposed to recoding it in VBScript.
02-10-2016 01:45 AM
Visual Basic is split up into three flavors.
All three share some concepts and as part of the Microsoft Cosmos the like ActiveX(OCX, COM component, CreateObject) components.
If your VBA code does not make use of special Excel functionality you can potentially just use it in VB to
create an ActiveX component that is also usable in VBS.
There are lot of tutorials out there how to create an ActiveX in VB.
Not sure if this helps but I assume this is the best way.
Potentially it is also possible to migrate the code to VBS but because VBS has no strict type system (as)
it is sometimes hard to figure out how to migrate code.
However ADO is completely accessible in VBS using its COM component.
02-12-2016 11:41 AM
thanks Andreas
I have reviewed a few tutorials on how to create and activeX component in VB and it appears this cannot be done in the VBA environment.
Some addition information.
My excel program utilizes an Add In developed by our test stand supplier which defines functions which allow us to retrieve data in VBA and pass it to excel. It appears these Add In's utilize a .dll the supplier made to recognize these functions in the VAB environment.
I know when we use matlab we refer to this .DLL as well and we gain the same functionality as in the VBA environment.
Is there anyway to add this to DIAdem? I have tried to ass it as a GPI extension but it isn't recognized.
02-15-2016 02:10 AM
Please contact Otmar,
otmar DOT foehner AT ni DOT com
he knows about the different ways how to extend DIAdem.
but if the extension is just made for Excel it is hard to shift.
Accessing the dll if the API is known is potentially possible in all three solution.
Please contact Otmar to diskuss it with him.
Andreas