LabVIEW application as ActiveX server

Hello all,
is there a possibility to detect (within the LabVIEW application), if a LabVIEW application (enabled as ActiveX server) is called through ActiveX or called through shortcuts (desktop, program menu, ...).
The background is, i want to do different things on startup depending on the kind of call.
Thanks in advance
Heinrich Eidloth

Hello Heinrich,
sorry, but the only thing I can tell you is, that there is no built in
mechanism in LabVIEW for detecting how the application was called.
If it is possible, than it would be somehow through Windows (WinAPI or
COM?). So the question would be, does Windows provide a way to
determine how an application was called. I hope you can get help from
Microsoft with this issue.
If you get a solution, it would be great if you could post it. This really is an interesting question.
Good luck.
D. Ackermann
Applications Engineer
National Instruments Germany

Similar Messages

  • Why I keep getting errors when I try to create my labview application as Active Server in my VB code? (Activex component can't create object)

    Error happens at the statement "CreateObject("myapp.Application")

    I am not quite clear about your question but my best guess is that you have not register your LV ActiveX Object. Try to run that LV object once to register.
    tc phan

  • Passing strings to a LAbVIEW application from Visual-C++ using ActiveX

    Hello all,
    I have built a LabVIEW application with ActiveX server enabled. I can
    start the application, and can read and set simple control values like
    numerics.
    But now I want to pass (SetControlValue) strings and read (GetControlValue) strings from controls.
    After searching a whole day for examples or HowTos I found nothing. Can
    anyone give me tip where I can find something about that?
    Examples are also appreciated.
    Best regards
    Heinrich Eidloth

    The problem you are running into is that a BSTR is not a normal string (%s in the printf), but a wide character string (i.e., two bytes per character) string with the size stored in it. If the string contains ASCII characters, such as Hello World, then the one of the bytes per character is 0 (for example, 'H' would be 0x48 0x0).
    When printf sees this, it thinks that it is a normal, null terminated string of "H". That is what you are seeing. You might try the %S (capital S) since that tells it the string is a wide character string.
    Also note that BSTR's are part of the COM (Automation) system and so are don't freed with a delete or free() statement. Instead you need to release the memory with a SysFreeString() call.
    If you aren't very familiar with C/C++, then you've taken on an advanced topic on top of a complicated language. If you can, you might want to try using either VB6 or .NET (C# or VB.NET). Those languages handle all of this for you automatically and you don't have to worry about freeing the memory.
    If not, the book I started with to learn COM programming was this one (http://www.amazon.com/gp/product/1572313498/104-3574382-6511132?v=glance&n=283155&n=507846&s=books&v...).
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Problems using Labview as ActiveX Server

    Hello,
           I have been having difficulty using Labview as an AcvtiveX server. I have reviewed all the postings on this subject and most are either pre Labview 8.2 and thus do not account for the changes made between 8.2 and 8.5 which broke the Activex server functions. I have looked at the recommendations for changing the to code to export (exported vi's in a DLL or Source distribution) and have tried these with no success. The closest example I have found was posted here http://forums.ni.com/ni/board/message?board.id=170&thread.id=283417 the example code they posted does ont work for me and still generates and error 3005.
          What i need is simple. I want to turn my applicaiton into a Vi server.. Expose a vi that acceses elements in the Vi server.. (controls, queues, Globals etc) that are in the Vi server context. I would then like to build a vi .. or dll that calls the 'exposed' vi in the vi server to pass data to or from the vi server. The V test.zip example file in the above indicated post is a pretty good example of this .. it just does not seem to work when i build it in 8.5. Are there any GOOD and 'current' examples of using labview as the ActiveX server (Compiled) and calling exposed vis from an external application Labivew, Visual Basic.. etc??  I am only interested in cases where Labview is the Sever. or both client and server.
           I have used a tool "ActiveXplorer" to examine the registered "exe" when the viserver is run. It always shows that there is no Type Library associated and the object is not creatable. There is a .tlb created by the project build however, where as the previous version 8.2.1 of Labview did not build that correctly. I have also tried this on 8.6 with similar error 3005 generated. sooooo what am i missing?
          Thanks
           Louis Ashford

    Mike,
           Thank you for your response to my question. The problem is that the example you site does not use the Labview vi as the Server. Excel is actually the vi server and the automation open is using and excel automation object. I am sure that Excel creates proper automation objects .. Labview however does not seem to. So while this example shows how labview can function as a client it is not an example of a compiled Labview Sever being accessed by a 'laview vi'. Possibly I am not looking at the vi that you are thinking of.
           The examples i am aware of:
                        "ActiveX Event Callback for Excel.vi... (Excel is server not Labview vi)
                        "ActiveX Event Callback for IE.vi (same Labview vi is client)
                        "Write Table to XL.vi" ( again excel is the server)
                        "3D Graph Properties - Torus.vi" (accesses an activex Control 'not' and Activex EXE)
                        "3D Lorenz Attractor Draw at Compeltion using 3D Curve.vi (Uses an activex  control not activex Exe server)
                        "3D Parametric Surface - Ribbon.vi (Uses an activex  control not activex Exe server)
                        "3D Surface Example - Fluctuating Sine Wave.vi (Uses an activex  control not activex Exe server)
                        "Excel Macro Example.vi (Uses excel as automation server..not Labview)
                        "FamilyTree.vi (uses MSComctlLib.ITreeView object not Labview as server)
                        "SlideShow.vi" (uses PowerPoint._Application not Laview as server)
          Most of the posts I have seen are for versions prior to  Labview version 8.2 (where the ActiveX server was broken) I have seen only a few posts that actually address the issue i am talking about. however thus far no real solution has been offered. I get the same results when compiling and testing this with 8.6..  as well. So have you tried this Mike? Possibly i am missing something very simple..
          The example i did find and gave the link to is a pretty simple one. This does not work on my machine at all. You can select the automation server that is registered with windows after running the server one time and this then breaks the client vi.. I have found by reselecting the GetViReference property node in the Client vi that it will the 'fix' the client vi as far as labview is concerened and it no longer shows and error. Now when you run the Client vi it will infact find the vi server and will launch it ok. However. The open automation object then hangs.. for quite some time then returns the error
    "Error -2146959355 occurred at Server execution failed
     in Client_reader.vi" Obviously the automation Exe (server) was seen because it was opened yet it did not return a valid reference so the subsequent property nodes in the client.vi will fail. Something is wrong with Labviews opening of or creating of automation objects..
              Thanks,,
                    Louis Ashford

  • How Do I set up a LabView ActiveX server?

    Are there any documenation or sample program which is about how to setup a LabView ActiveX server? my C++ program will dynamically call VI and then pass the integer to Labview program via ActiveX and then perform some control of digital oscillscope. Do anyone help me? thanks for help so much......It is in hurry......please help..............
    CowCow

    From the NI knowledge base...
    Problem: How do I enable LabVIEW as an ActiveX Server?
    Solution: Under Edit >> Preferences >> Server: Configuration, select ActiveX as a protocol and enable all server resources. Under Edit >> Preferences >> Server: Exported VIs, list the name of all VIs that can be accessed remotely. You can include the full path to the VI, or just list its name. Wildcard characters are valid. You can explicitly deny access to certain VIs by clicking the Deny Access button. Note that changes to the Server will not take effect until LabVIEW is relaunched.

  • Starting applications remotely using LabView activeX server

    I want to
    make a program that enables me to start applications on a remote computer. I
    made a program that starts applications using either System exec.vi or .NET and
    both methods work find on my local computer. I built it with activeX server
    enabled and copied it to my remote computer. After struggling with DCOM
    settings and Security settings for a couple of days!! I’m now able to start the
    program from my local computer. The thing is that I can’t see either the
    LabView program or the started application. When opening the Windows Task
    Manager, I can see both the programs under the Process tab so they have
    started, but obviously as a “background” process and not as an application.
    Does anyone
    have an idea on how to start the programs as applications?

    Why not just use PsExec?
    http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

  • How to implement an ActiveX server in LabVIEW

    My task is to implement an ActiveX server in LabVIEW 8.0 that will be called from a data management software (DXE).
    The LV server will take care of data acquisition and control.
    I have been looking for tutorials and example code at the NI developer zone and elsewhere without any progress. Information is either to general or code is to old (LV 5.1) to give any help.
    Please, show me to a good example of an ActiveX server in LV 8 properly commented or with attached explanations.
    Alternatively, suggest any tutorial, short course or books with practical instructions.
    Specific information is most welcome.
    I suppose that it is possible to write a ActiveX client in LabVIEW to verify the functions of the ActiveX server ?

    rolfk wrote:
    skalis wrote:
    Thank You. Good to know that I am on the right track.
    However,
    Your sentence "If You look at the several shipping examples..." make me
    little concerned. I am not able to find any example of a LV ActiveX
    server in my LV 8.0 installation. I would be very grateful of You can
    send me any.
    Basically you can not create your own
    Active X server with your own object hierarchy and methods in LabVIEW.
    LabVIEW however can export a predefined Active X server interface that
    is just another access method to its internal VI server interface.
    With this interface you can determine what VIs are available to
    control, load specific VIs from disk if you know their path and,
    execute those VIs and passing parameters to it and receiving outputs.
    So if your software allows you to script the Active X access to an
    Active X server in some ways such as VBA or similar you should be fine.
    If your software expects a specific Active X interface you have to
    implement in the server application, you are out of luck with LabVIEW,
    without using an external component such as an extra Active X server
    DLL that translates between the expected interface and the exported
    LabIVEW interface. But this last method is quite likely not worth the
    hassle.
    Rolf Kalbermatter
    While I did follow the link mentioned above and found the Interop.LabVIEW.dll that is included in the C# project for the purpose of calling VIs from C#, I am frustrated that these methods are 'buried' in a .dll that you have to go and find on the NI web site, and are not ActiveX methods that are available in an ActiveX Object that is installed when you install LV 8.20 PDS. 
    Rolf, I don't know that you will get this email, but are you refering to the methods inside of the Interop.LabVIEW.dll in what you are saying above, and if so, how did you become aware of this .dll? 
    Is anyone aware of any documentation for these ActiveX methods?
    Thanks,
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI

  • Calling LabView ActiveX Server from TCL?

    Does anyone have experience calling a LabView ActiveX server vi from
    TCL? I created a simple VI with one control (labeled "A") and one
    indicator (labeled "B") and a +1 adder between them. I can load and
    open the VI from TCL:
    package require tcom
    set lv [::tcom::ref createobject "LabView.Application"]
    set viPath "D:\\National Instruments\\LabView\\Activity\\a.vi"
    set vi [$lv GetVIReference $viPath]
    $vi FPWinOpen True
    But when I try to send in data:
    $vi -namedarg Call A 1
    I get the error message "unknown parameter A".
    I have also attempted to duplicate the "ActiveX Server" example
    from the LabView help file, calling "Frequency Response.vi". This
    approach encounters the same error message:
    % package require t
    com
    3.0
    % set lv [::tcom::ref createobject "LabView.Application"]
    ::tcom::handle0x013202F4
    % set viPath "D:\\National
    Instruments\\LabView\\examples\\apps\\freqresp.llb\\frequency
    Response.vi"
    D:\National Instruments\LabView\examples\apps\freqresp.llb\frequency
    Response.vi
    % set vi [$lv GetVIReference $viPath]
    ::tcom::handle0x01335AE8
    % $vi FPWinOpen True
    % $vi -namedarg Call Amplitude 10
    unknown parameter Amplitude
    If anyone can point me in the right direction, or give me an
    example of how to do this I would greatly appreciate it.
    TIA.
    Leslie

    In article ,
    Leslie Brooks wrote:
    >"Bruce Hartweg" wrote in message
    >news:...
    >> "Chin Huang" wrote in message
    >news:[email protected]...
    >> >
    >> > I don't use LabView, but from the Visual Basic example I saw, it seems
    >> > the Call method takes two arguments. The first is an array of parameter
    >> > names and the second is an array of parameter values. Try to send in
    >> > data with the Tcl command
    >> >
    >> > $vi Call [list A] [list 1]
    >>
    >> I'm unable to help the original question (don't know LAbView or VB stuff) but
    >> just want to point out that [list A] is equal to A and [list 1] is the
    >same as 1.
    >>
    >> Bruce
    >
    > I know what is supposed to be passed to the 'Call' method. Doing
    >this:
    >
    >set inst [::tcom::info interface $vi]
    >$inst methods
    >
    > produces (among other things):
    >
    >{1015 VOID Call {{{in out} {VARIANT *} paramNames} {{in out} {VARIANT
    >*} paramVals}}}
    >
    > So the 'Call' method is expecting two parameters, both pointers
    >to variants. TCOM appears to be passing the correct parameter type
    >because the TCOM documentation says that a TCL List maps to a
    >one-dimensional array of VT_VARIANT. However, the results are
    >INvariant (bad pun intended):
    >
    >% $vi -namedarg Call Amplitude 10
    >unknown parameter Amplitude
    >% $vi -namedarg Call [list Amplitude] [list 10]
    >unknown parameter Amplitude
    >% $vi -namedarg Call [list Amplitude] [list [::tcom::na]]
    >unknown parameter Amplitude
    >% set i 5
    >5
    >% $vi -namedarg Call [list Amplitude] {incr i}
    >unknown parameter Amplitude
    >% $vi -namedarg Call [list Amplitude] [list [incr i]]
    >unknown parameter Amplitude
    >% $vi -namedarg Call Amplitude [incr i]
    >unknown parameter Amplitude
    >
    > Who can help me with this? Who is the LabView Guru?
    Try invoking the Call method without the -namedarg option. The
    -namedarg option doesn't work the way you seem to think it works. The
    -namedarg option provides a way to specify arguments named from the
    method's parameter specification. For example, you discovered that the
    Call method take two parameters named "paramNames" and "paramVals".
    Tcom returns the error "unknown parameter Amplitude" because "Amplitude"
    doesn't match either parameter name.

  • Labview ActiveX Server PATH if in developmen​t environmen​t

    I'm using Labview 2010 to build an ActiveX server.  I can access the executable as an activeX sever from both C and LabVIEW clients.  No problems there.  But now I want to do some debugging in the development environment while accessing the program via an ActiveX client.  In such a situation, how do I change how I access the VI's in the project?  I tried using the lvproj in place of the EXE, but this was insufficient.  Seems a little convoluted with the changes required to do this debugging.

    I think that I already have my answer in that I can not generate a LV event through an ActiveX interface regardless of the type of control, but if you want to play with it, here is a Demo which I derived from the previous link given above.  Within the attached ZIP file, read the "Readme.txt" file for instructions.  Specifically the program assumes that is located in C:\tmp, since LabVIEW doesn't like relative pathes in both the build and reference node paths, (so they are coded with absolute pathes).  If you use C:\tmp, the instruction in Readme.txt should work.
    What happens is that you click on the button in the ActiveX Client running in the LV development space.
    You can see the control value change shade/color in the ActiveX Server EXE application,
    but because no event is generated, the Event Handler does nothing.
    I know that I can poll the value of the control and then use the Value (Sgnl) property control to generate an event, but this isn't a very clean solution.
    All code in the ZIP file is LabVIEW 2010 release1
    Attachments:
    LV ActiveX Demo.zip ‏172 KB

  • Does Labview's ActiveX server throw any events?

    I'm trying to use Labview as an ActiveX automation server. It works so far, but I can't figure out a good way to get data back from the VI without polling it. Does Labview throw any ActiveX events that I could catch or is there some other way to receive data? Polling is a rather poor solution, so I figure there must be a better way.

    qx3n42j,
    I ran the List ActiveX Events shipping example on LabVIEW 6.1 and it returned that there are no events. I also searched through the documentation and found no reference to LabVIEW ActiveX events.
    You could implement a DLL that throws an event and call that from your LabVIEW VI.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Turning a LabVIEW built DLL into an ActiveX server

    Does anyone have a list of the steps you must go thru
    to convert a LabVIEW generated DLL into an ActiveX server. Do the functions become methods?

    Hi James,
    we have a library we deploy in three ways: as a LabVIEW library, as a DLL and as Active-X server.
    In the build file for the DLL we have made each "function to call" a top level VI.
    In the Active-X server each "function to call" is a dynamic VI. We created a new top level VI which will run when the server is started and stops after his window is hidden. In LV 6.x you need the winutil library to hide the window. If you close the window (through FP.Open set to FALSE) the server will stop. The window size is set to 1x1 in the VI Properties to minimize flickering on the screen during start of the Active-X server. You must check the "Enable Active-X Server" box on the "Application Settings" page in the app builder. In your client application yo
    u open a reference to the server and then you can open a reference to the VI. You set/read the controls and run the VI. There is sample code for Visual Basic on the NI web site. I have also sample code for Visual C++ single and multi threaded clients.
    If you are interested in the examples contact me at [email protected] and I will ask my customer to allow me to send it to you.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Labview activex server registration incomplete.

    I made an ActiveX server using LabVIEW. The server should communicate with Excel. During installation of the server I register the server: "Server.exe /RegServer". When I try to call the server from Excel/VBA, it responds with "Run-time error '429': ActiveX component can't create object". The server is only recognized by Excel after I have started and stopped the server once.
    When investigating the registry, it appears that the difference between registering with /RegServer and just starting and stopping the server are the following registry keys:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application.6
    To my opinion the /RegServer commandline option does not do the whole job.
    Also /UnRegServer does not remove the above mentioned registry keys.
    Is this a bug or just normal behaviour?
    Has it been solved in newer LabVIEW versions (I use 6.0.2)?

    Hi,
    I've tried to call a with LabVIEW 7.1.1 created activeX server. This works without any errors. I've attached my code. 
    As for the register keys, this seems to be the default behaviour of ActiveX, each server has a key without version number e.g.
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application
    And one or more with a version number:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application.6
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application.7 Kind regards,
    Karsten
    Applications Engineer
    National InstrumentsMessage Edited by KvZ on 07-27-2005 02:37 PM
    Attachments:
    ActiveX Server.zip ‏45 KB

  • Every build of LV ActiveX server Application gets NEW CLS-ID

    English translation of this thread? Scroll down!
    Problembeschreibung – kurz
    Es entstehen unterschiedliche CLS-ID’s für dieselben LV-Applikation die mit Application Builder und Option „Enable ActiveX server“ auf unterschiedlichen PCs kompiliert wird.
    Fragen:
    1) Wie kann man die Vergabe einer neuen CLS-ID vermeiden wenn eine Applikation nicht zum ersten mal übersetzt wird?
    2) Kann man die Verwendung einer eigenen CLS-ID erzwingen?
    Problembeschreibung – detailliert
    1) Es gibt zwei Entwicklungssysteme (PC 1, PC 2) mit derselben LV 7.1 Entwicklungsumgebung.
    2) Es gibt eine LV-Applikation „duck16“, die wie beschrieben auf beiden Rechnern kompiliert wird:
     * Erstes Kompilat - auf PC 1
     * Dann Übernahme der Quellen auf PC 2 (über Visual SourceSafe)
     * Zweites Kompilat - auf PC 2
     * Dann wieder Übernahme der Quellen auf PC 1 (über Dateien kopieren)
     * Drittes Kompilat - auf PC 1
    3) Die Kompilierung erfolgt immer mit Application Builder und der Option „Enable ActiveX Server“
    4) Es entstehen bei jeder Kompilierung die TypeLibrary mit 2 Proc-IDs und zugehörigen CLS-IDs:
     * duck16.Application
     * duck16.Application.7
    5) Fehler 1: Die CLS-ID vom zweiten Kompilat ist anders als die vom ersten
    6) Fehler 2: Die CLS-ID vom dritten Kompilat ist dieselbe wie vom zweiten – aber anders als die des ersten, welches ja auf demselben Rechner entstanden ist!
    Problem – in brief
    Compiling the same LV application on two different PCs brings out two different CLS-IDs using Application Builder and option “Enable ActiveX server”
    Questions:
    1) How to avoid that LV creates a new CLS-ID during a build that is not the first build?
    2) Is it possible to force LV to use a defined CLS-ID?
    Problem - in detail
    1) There are two development PCs (PC 1, PC 2) having the same version of LabView installed (V7.1)
    2) There is one LV application “duck16” that is compiled on both systems as described:
     * First build - on PC 1
     * Check out the applications sources on PC 2 via Visual SourceSafe
     * Second build – on PC 2
     * Copy the applications sources back to PC 1
     * Third build – on PC 1
    3) We always use Application Builder and option “Enable ActiveX server” on both systems
    4) Every build creates a Typelibrary with two Proc-IDs and CLS-IDs:
     * duck16.Application
     * duck16.Application.7
    5) Error 1: CLS-IDs of first and second build are different.
    6) Error 2: CLS-ID of build three is the same as of build two – but different as of build one (of same PC!)
    Beste Grüße,
    Oliver Thost.

    You are correct that the .bld file is not the only place were the CLSIDs are 'stored'.  The EXE itself contains the CLSIDs.  The way App Builder works is initially the CLSID information is empty.  When you check the 'Enable ActiveX Server' box the information is still empty, even if you save the .bld file.  The first time you build with the box checked the App Builder will generate the CLSIDs for the exe and store them in the EXE.  The bld script will also store the CLSIDs _if_ the user saves the .bld file after building.  After that initial creation the CLSIDs are loaded from the .bld script and passed to the function that generates the exe.  The function will also read them from the EXE, the ones stored in the EXE override the ones from the .bld script, so if there is no EXE or it wasn't built with ActiveX turned on then the ones from the .bld script will be used.
    So if the user wants to use the same CLSIDs for a given exe in different LabVIEWs or different machines, then they need to check the box, build the exe and save the .bld script after building.  Then they can use that .bld in the other locations as long as they don't have an exe in the build location in the new copy of LabVIEW before building (otherwise the CLSIDs will be read from the exe).
    If the user wants to clear the CLSID for a .bld file and exe, they need to uncheck the Enable ActiveX Server box and recheck it and save the .bld script and delete the exe that has been built.  Then new CLSIDs will be generated for the exe.
    Hope this helps,
    Rebecca Fox, AE, Germany
    Rebecca Fox
    Applications Engineer
    National Instruments

  • DECODING MAIL FROM WEB SERVER IN PLAIN TEXT FORMAT(THE MAIL BEING SENT BY LABVIEW APPLICATION)

    Hi All
    I have a labview application that send mail every hour automatically.
    But actually the mail has to be decoded from the web server(by another application).But now when that application decode the data in the mail(that is send by labview application)its getting some funny characters inside that can not be detected by the decoding application
    (When open the mail no problem.)But actually our goal is to decode the mail from the web server.
    Why the extra characters are appearing when decoding from the server?Is it because of the HTML format?
    Is there option to send the mail in plain text format(not like attachment)?
    In outlook we can change the setting (tools->options->send->mail sending format->....here we can set as HTML format/Plain Text format)
    Like that at the sending time can i chenge the sending option as plain text format in my labview application?
    Thanks...

    smercurio_fc wrote:
    Then it sounds to me like this other application is not decoding the attachment correctly, especially if you looked at the attachment yourself after you received it and verified it's correct.
    No, no, smercurio. This is charcter encoding here. In older versions of LabVIEW you could specify what character encoding to use when sending an email through the SMTP VIs. But that gave problems since people in certain locales used certain characters that where not transfered right when the wrong encoding was specified, and that encoding stuff is not understood by most people at all, so the wrong selected encoding was rather the rule than the exception. In newer versions of LabVIEW do the SMTP VIs handle the encoding automatically based on the currently used locale on the system.
    This change is documented in the Upgrade Notes of LabVIEW and probably happened around LabVIEW 7.1 or 8.0.
    A decent mail client will recognize the encoding and convert it back to whatever is necessary before presenting it to the user. The OPs posters server application obviously isn't a smart mail client but probably just some crude text file parser that has no notion of proper mail character encoding and how to deal with it.
    I would suppose that there is a chance to dig into the SMTP VIs itself and try to manipulate or disable that encoding altogether in there but that may open a whole can of worms somewhere else. The proper way would be to process the incoming mail by a character encoding aware mail client before passing it to the text parser. On Unix setting up something like this would be fairly trivial.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-23-2008 10:21 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Getting clusters from LabVIEW ActiveX Server with Excel/VBA

    Hello,
    my colleague and I are trying to control a LV from Excel (VBA) by ActiveX.
    I.E.:
    We do something like :
    Set LV = createObject("LabVIEW.Application")
    Set VI = LV.GetVIReference("Path_to_VI")
    ParamNames(0) = "Input1"
    ParamNames(1) = "Input2"
    ParamNames(2) = "Output"
    ParamValues(0) = 1
    ParamValues(1) = 3.1415
    Call VI.Call(ParamNames,ParamValues)
    msgbox("output =" & ParamVals(2))
    This works perfectly for simple data types (int, double, float, string, etc )
    Now we need to transfer more complex structures, which are originaly LV-clusters.
    But we did not find any clue on how do that (especially receive clusters) in the help or on the internet.
    Is there any chance to succeed ???
    TIA,
    Thomas

    Actually, working with clusters is really really easy. Through the magic of - well something - a cluster in LV comes out in the VBA environment as an array of variants. There was an activex example that shipped with V7.1 that showed this very thing. I couldn't find them in V8 so here is the 7.1 stuff.
    Check out the macros in the Excel spreadsheet... This show running the VI in the development environment, but if this looks interesting I can fill you in on how to make it work in an executable.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    freqresp.xls ‏49 KB
    Frequency Response.llb ‏155 KB

Maybe you are looking for

  • Date and time embedded in DV movie: how to get it into iMovie?

    Hi, I've been trying to find an answer to this question using Google, but was not succesful, so here goes. I am a fairly new Mac user (yup, I moved over from The Dark Side, at least when at home). Last year, I made a family movie using Ulead VideoStu

  • Using iPad charger w/ iPhone 3GS

    Is it safe to do so? I'd like to carry only one charger.

  • Columns as rows...

    Hi all,       I want to design a table such that my columns and rows will be dynamically created.. for eg.                           D1                     D2                     D3                       (columns) A-row B-row C-row Based on my i/p ro

  • I want to transfer itunes library on mac os 10.3.9 to airbook snow leopard.  can i

    i have a silver tower with my itunes library that i need to transfer to a mac airbook i am about to buy that has leopard and was updated to lion. how do i do this? please advise.

  • Remain on Infotype screen after save

    I have a created a custom infotype 9xxx and now I have a requirement that user are allowed to saved changes on infotype 9xxx thru PA30 and it has to remain on infotype 9xxx screen instead of jumping out to PA30 screen after saved. Is this possible? I