From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Call COM Server and CreateObject

Hi Brad, thanks for the response.

 


@Brad_Turpin wrote:

Hi Scott,

 

This is why COM objects are preferable for VBScript.  Those explicit data typed prameters won't work in a VBScript, where are variables are of type=Variant.  The COM object wraps up the code with all Variant input and output parameters.  Perhaps your contacts can provide you with a COM wrapper for this DLL.

 



 I thought FluidProp was going to be my wrapper for RefProp. But what I'm learning is there needs to be a specific wrapper written that ONLY accepts the variants and basically converts them to the appropriate data type? 

 

 

 


@Brad_Turpin wrote:

Hi Scott,

 

 

Alternatively, you could call the external code with a LabVIEW VI and run that VI from the DIAdem VBScript using the LVRuntime object.

 


 

I don't have Labview, only signal express. I suppose I could go the demo route just to build the VI.

 

Though I think the bricks are falling into place...this is what the GPI Toolkit is for? V11.0 still the latest verion I seem to be able to find?

0 Kudos
Message 11 of 13
(2,383 Views)

Hi sg,

 

The GPI Toolkit is for integrating external C++ code, so that's something different entirely from calling a LabVIEW VI.

 

Brad Turpin

DIAdem Product Support Engineer

Naitonal Instruments

0 Kudos
Message 12 of 13
(2,373 Views)

@Brad_Turpin wrote:

Hi sg,

 

The GPI Toolkit is for integrating external C++ code, so that's something different entirely from calling a LabVIEW VI.

 

Brad Turpin

DIAdem Product Support Engineer

Naitonal Instruments


Thanks for clarifying the GPI. I didn't find it very clear (obviously) in anything I've read about it. Only that I'd need to get a copy of Visual Studio and open that can of worms. UGH. Totally not efficient for me.

 

I looked further at the Labview VI route, and while I could go that way, its going to be a ton of work to make it all work. Some of the pre-coded VI from RefProp work, some don't.

 

So, I've decided to throw in the towel on Diadem doing the thermodynamic analysis. Its good for collecting and organizing the data, but I can send the summary values to Excel, let it calculate, then pull the results back. It sucks to have to do that, but with the direct Excel calls, its not going to be too difficult. AND, all my thermodynamic calcs are already programmed into Excel, I don't need to re-invent all those calculations within Diadem scripts and deal with debugging all those formula again. I should have started the project this way in the first place, I'd be done already.

0 Kudos
Message 13 of 13
(2,371 Views)