DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Function Add Ins

Solved!
Go to solution

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

Tim
0 Kudos
Message 1 of 12
(5,110 Views)

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.

Otmar D. Foehner
0 Kudos
Message 2 of 12
(5,097 Views)

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.

 

0 Kudos
Message 3 of 12
(5,088 Views)

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.

Tim
0 Kudos
Message 4 of 12
(5,082 Views)

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.

0 Kudos
Message 5 of 12
(5,078 Views)

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
Tim
0 Kudos
Message 6 of 12
(5,076 Views)

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. 

 

 

Tim
0 Kudos
Message 7 of 12
(4,999 Views)

Visual Basic is split up into three flavors.

 

  • VB: Visual Basic
  • VBA: Visual Basic for Applications
  • VBS: Visual Basic Script

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.

0 Kudos
Message 8 of 12
(4,984 Views)

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.

Tim
0 Kudos
Message 9 of 12
(4,943 Views)

Please contact Otmar,

 

otmar DOT foehner AT ni DOT com

 

he knows about the different ways how to extend DIAdem.

 

  1. GPI should work
  2. DataPlugins might work
  3. Creating an ActiveX should work

 

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

0 Kudos
Message 10 of 12
(4,917 Views)