From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

run diadem in backgrond

Hello,
 
I call Diadem in Labview and run VBS script automatically. After generating the report DIAdem save the report in PDF format in specified file. Sofar it works fine. I would like to call DIAdem and run the VBS script to creat a report in PDF format without showing DIAdem. Is it possible to run DIAdem in background?
If yes how can I do it? Any idea?
 
Thanks!
0 Kudos
Message 1 of 8
(4,196 Views)

Hi FHM,

Unless you are specifically requesting DIAdem to run visibly with the ActiveX command, or unless DIAdem was already launched prior to the ActiveX call, the report creation should occur invisibly.

Are you using the LabVIEW-DIAdem Connectivity VIs or the "DIAdem Report" express VI?
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 8
(4,177 Views)

Hello Brad,

I am not using any LV Diadem VIs. I am using the windows commands to call Diadem. See attached screenshot. I would like to call Diadem invisibly in backgroung and run the script. Let me know if you have further questions. Thanks!

 

0 Kudos
Message 3 of 8
(4,168 Views)

Hi FHM,

I see.  Well you have two options if you are to stay with the DOS call approach, you can either Call WndShow("SHELL", "MINIMIZE") at the beginning of your VBScript, or you can add "-embedding" at the beginning of you DOS extension list, i.e.

DIAdem.exe -embedding

Ask if you have further questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 8
(4,132 Views)

I'm having an issue using the -embedding option.  Is this a DOS command or is it a Diadem specific option?

 

It seems like it is truncating my command when I use the -embedding command.  Is there a character limit?

Everything works as intended if -embedding isn't used.

 

See my attached jpg.  

 

Download All
0 Kudos
Message 5 of 8
(3,479 Views)

Hi TstGngr,

 

I"ve neverr tried to add multiple /c extensions to the same DOS command that launches DIAdem.  What happens if you move those T1 and T2 assignments inside the VBScript and just have the -embedding extension and the /cScriptStart() extension?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 6 of 8
(3,461 Views)

Hi Brad,

 

The T1 and T2 assignments need to be dynamic.  I've tried running it with just T1 assigned - this works fine except that my script errors out as it needs to know T2, and T3.  

 

I then tried running it with including T1 and T2, and it gets further into the script, but again errors because it needs to know T3.  When I make all 3 assignments, it seems to be looking for a Script that is always the first part of the path to that script, but always truncates it, and says it cannot find C:\U.VBS or C:\Users\Pu.vbs, depending on how many characters are before it.  

 

A character limit seems very strange to me, but that really looks like what is going on.  I tried reducing the file extensions to a minimum, and using the -embedding works exactly how I would hope, but there is a chance that the path names would be too long, and I would want this to be more robust than that.  

 

The program that generates this command actually creates a .tdm/.tdx file from a raw (.mat) file using nilibddc.dll.  Do you know if there are methhods/functions availalbe in the nilibddc.dll library that would help me pass information into diadem and have it save out a pdf without opening?  

 

Thanks,

 

-Brian

0 Kudos
Message 7 of 8
(3,454 Views)

Hi Brad,

 

I figured out a solution that should be robust - just having my program write the vbs script, and defining T1, T2, and T3.  Like you said, that way I only have to call the script when opening diadem.

 

Thanks,

 

Brian 

0 Kudos
Message 8 of 8
(3,449 Views)