ActiveX Variant in Invoke Node?

I'm trying to do some stuff with a Word document through ActiveX in LabVIEW. This is mostly going well, but I am unsure of what the variant options are on the invoke nodes. I have included a picture with the variants on the invoke node circled. Where are these variants documented? What kind of data/type needs to be in the variant to use these options?
Thanks.

Whoops... I meant to put this inthe LabVIEW board, not the TestStand board. Will someone please move it to the appropriate board for me?
Thanks.

Similar Messages

  • Invoke Node causes error in VI

    The attached VI is one of numerous VIs in an application that I "inherited".  I am attempting to rebuild the application to incorporate some changes I have made.  This VI has an error, which indicates that there is a bad or unwired terminal at the Invoke Node for the PrintOut method.  According to the Help system, all of the unwired parameters for this node are optional, so the node appears to be wired correctly.  What am I missing?  Thanks.

    Hello,
    Thanks for attaching the VI.  I believe the preview -> lost attachment issue has already been reported to the admins for this discussion forum.
    As for your VI, I'm guessing this problem is happening because you are running a different version of Office than the computer on which this application was originally developed.  On the PrintOut invoke node, try selecting another method in the method list.  Then try selecting "PrintOut" again.  This should re-link the method to the "PrintOut" method specific to the Word version on your computer, and you should be fine.  By the way, the VI opens just fine (no broken run arrow) on my machine, and I'm running Office XP.
    Let me know if this solves the problem.  Oh yeah, here's a tip.  I noticed that in this code, there is a Boolean constant wired to the "Close" method, but it's wired into a "To Variant" function to convert it to a variant.  This explicit conversion is not necessary...for any ActiveX property or invoke node that takes variant inputs, you can just wire the native LabVIEW type directly into the input (without an explicit conversion) and it will work fine...this should save you some time as you write new VIs, or edit this set of VIs you inherited.
    Good luck,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Using ActiveX variant BTY_string conversion problem

    All,
    I am using LV5.1f1 with a self written activeX libray. I am using a variant
    object type (B-string) to communicate with the library. On the LV side, I
    convert an array of 6 U16/u8 byte to string with the u8 string conversion
    icon.
    It is said, that Lv automatically converts all input objects going to the
    invoke node of the ActiveX object. This is not true, as the string result
    on the library side is wrong in one of the 5 bytes.
    Can anybody help ?? Pleeease

    > I am using LV5.1f1 with a self written activeX libray. I am using a variant
    > object type (B-string) to communicate with the library. On the LV side, I
    > convert an array of 6 U16/u8 byte to string with the u8 string conversion
    > icon.
    >
    > It is said, that Lv automatically converts all input objects going to the
    > invoke node of the ActiveX object. This is not true, as the string result
    > on the library side is wrong in one of the 5 bytes.
    The automatic part refers to the fact that LV maps things like arrays to
    Safe Arrays and LV strings to Variant strings. It cannot however know
    what formatting you expect within a string, and that seems to be your
    problem. When you are converting the LV array to a string, are you using
    a Format to String node where you specify nu
    meric formatting options, or
    are you simply casting them to a binary representation of the string. It
    sounds like you are casting to a binary string. If so, you will probably
    find that the dual byte fields have their bytes swapped since LV always puts
    these binary string representations into big-endian format. You are probably
    better off just wiring the array straight into the ActiveX property or Invoke
    node without any type of casting or converting. If your ActiveX server is
    using strings to pass binary information and expects it to be in little-endian
    order, then you can use the Swap Bytes node that is in the Advanced functions
    I believe.
    Greg McKaskle

  • Excel ActiveX invoke nodes are broken

    I am using LabVIEW 2007.  We are using a VI that runs on most of the PC's in our facility however on some the "invoke node" related to Excel functions don't operate. They are broken and the VIs won't run.  We get errors that the "Invoke Node: contains unwired ro bad terminals".  When going to select methods or properties not all of the properties are shown as seen on the functional PCs. Some of the properties are missing from the selection menus, thus making it incompatible.
    Has anyone seen this problem and a solution?
    Thanks
    Manliff,

    What about separating the compiled code from the source?  I recognize that this will only work in LV2010, but I expect that that will prevent the compiler from breaking activeX code that depends on a different version than the local one...
    Testing this idea is on my to-do-list, but I was wondering if anyone has tried it already.
    -Barrett
    CLD

  • Strange behaviour with ActiveX invoke node and Excel

    I want to send a table of numbers from LV50.1f to Excel97. After getting a
    reg to Excel8.Application I retrieve the Workbooks property, Invoke Item to
    select a certain Workbook reference, retrieve the Worksheets collection
    reference, Invoke Item and then get a reference to WORKBOOKS again.
    Strangely, there is an example code from the NI web site that does exactly
    the same, but in the last step a variant is returned in stead of a
    reference, which is converted using Variant to G to a Worksheet reference.
    when I copied that last invoke node to my VI I also had a variant returned,
    so on one diagram I had to invoke nodes connected to the same sources, one
    returning a ref, the other returning a variant!
    Disco
    nnecting the sources to my Invoke node and rewiring gave no change.
    Also type casting the ref to workbooks to a worksheets ref, didn't work - I
    get errors in the following property node that retrieves a Range - which
    exists in Worksheet, but not in Workbooks.
    Appearantly, LV gets the returned type mixed up sometimes, and there is no
    way to fix it other then copying a invoke node from another diagram?
    Finally I got it working though, but this behaviour puzzles me. Contrary to
    the example from NI, I now managed to send a table (2d array of strings) in
    one call to Excel (don;t need to loop over cells or columns).
    PS
    I used to do the same using DDE but ranges are different for each language
    version of Excel (i.e. R1C1 for English and R1K1 for Dutch), so my VI's need
    to know the language of Excel. Also with NT and Win98, getting a DDE
    connection often hangs LV. But a big progress has been made - now I need
    different VI's for each version of Excel!!!
    Ferry Toth
    Enraf BV, The Netherlan
    ds

    Hi Enric,
    Can you try your queries again using the new release of DB XML? It contains some improvements in this area.
    http://www.oracle.com/technology/software/products/berkeley-db/xml/index.html
    John

  • ActiveX Object Creation method to pass to an Invoke Node

    Hi!
    I'm trying to optimize the way in which I use MathCAD from LabVIEW.  One of my VIs is having really poor performance in terms of execution speed and memory usage.
    My VI converts a 2D LabVIEW array of doubles into a 2d Mathcad matrix and puts that matrix into a Mathcad worksheet.  The issue is that you do not just pass the 2d array of doubles into the SetValue invoke node as a variant.  You have to create a Mathcad.MatrixValue object, and then pass the object to the SetValue invoke node.
    Here is the example code provided in the Mathcad developers manual:
    SetElement Method
    var m = CreateObject("Mathcad.MatrixValue");
    for(row = 49; row >=
    0; --row)
    for(col = 9; col >= 0;
    --col)
    var val = row + col;
    m.SetElement(row, col, val);
    Here is my implimentation in LabVIEW:
    Here is my SubVI
     Here is my main VI:
    My SubVI is running out of memory and throwing the following error:
     Exception occured in mplrun: Exception of type 'System.OutOfMemoryException' was thrown. in NL SubVIs Library.lvlib:Convert LabVIEW 2d Array to MathCAD Variant Matrix (SubVI).vi->test.vi
    It doesn't always throw the error.  When I watch the memory consumption of LabVIEW it goes up to about 250k and then drops to 90k and slowly builds back up to 250k.  Initialy starting the code takes awhile too on my computer.  From start of VI until first loop iteration it is about 20 seconds, and then about 150-250ms after that.  Not very good performance.
    Any advice on how to optimize this code would be appreciated.  I'm not really sure when I should close some of these references.  I tried closing the reference in my converting SubVI, but I guess that destroys it so MathCAD can't use it.
    I'm in LabVIEW 2009.  Any help is appreciated. 
    Thanks for your time and input!
    -Nic

    I'm not sure this will solve your problems but it should help.  You need to close ALL of your references to Mathcad objects when you're done using them.  That means you need to close the reference to the Mathcad MatrixValue after you pass it to Mathcad (to do this you'll need to convert it back from a variant, or pass the reference directly out of your subVI), and you should also close the reference to the matrix that you get back after you've converted it to a LabVIEW array.  Otherwise you'll continuously allocate more and more memory rather than allowing it to be reused.
    Less importantly, you should also close your references to IMathcadWorksheets and IMathcadWorksheet (but since you only open them once it's not causing your memory problems).

  • ActiveX Invoke Node returns -2146959355

    I ran the attached VI on LV 5.1.1 w/ no problems. Its purpose is to change the configuration of an HP16522A Pattern Generator accessed by LAN (hplogic1 is the mainframe's IP). I've also installed LV 6i at the same time, but whereas LV 5.1.1. still works fine, LV 6i fails - but only on the 'LoadFile' Invoke Node. Also, if I connect 'StatusMsg' Property Element to an indicator, LV 6i shuts down abnormally with a MS/C++ error.
    I've tried loading the LV 5.1.1 VI on LV6 but the result is the same.
    My OS is Win2000 5.00.2195/Service Pack 2.
    Attachments:
    hp16522_-_load_ascii_file.lv6.vi ‏45 KB

    One thing that you may try to solve this ActiveX error is to, in LabVIEW 6, select File>>VI Properties. Select Execution from the category box and set the Preferred Execution to user interface. This should solve the problem.
    Also, National Instruments has a LabVIEW driver for HP16522A, but it is somewhat different for LabVIEW 5.1 and 6i. The VIs, and the ActiveX objects they use may be different for these two versions. You may consider downloading the driver for LabVIEW 6i from:
    http://zone.ni.com/idnet97.nsf/9b2b33e1993d877786256436006ec498/16f803b84cc3b502862568ab005fb9ea?OpenDocument
    Zvezdana S.
    National Instruments

  • Parallel calls to ActiveX using Invoke Node

    Dear colleagues,
    Please help/advice on such a problem.
    The program has a VI template (template.vit) having an ActiveX.
    Two calls to this template create different instances of the ActiveX with different reference numbers.
    Two asynchronous processed invokes the same function of the ActiveX supplying two different refs to Invoke Nodes. Execution of the function takes significant time.
    Apparently functions of two instances are not executed asynchronously. The second waits until accomplishment of the first.
    Please advice how the problem can be approached/solved. We need independency of the calls.
    PS: Most of the tests were done with LabVIEW 8.6.1
    Thank you

    Here's a quick example. Note that for charts you should also clear the history if so desired.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    defaults.vi ‏25 KB

  • How to get a LabVIEW class object to expose an invoke-node method?

    Hi,
          I like the property/invoke-node "paradigm" used for interacting with "objects".  Can LabVIEW-class objects expose their properties and methods this way?  Can one or more LabVIEW-class objects be compiled into a library or "assembly" (or other distrubution format) that allows the property/invoke-node usage?
    I've looked at (but not completely understood) "Creating LabVIEW Classes".  Have also searched for related posts.
    The pic below shows an invoke node wired to a class with a Public VI "VAT.Status.Hello.vi".  I'd like to see VAT.Status.Hello show-up as a Method.  (I just tried "Select Method", and selected "VAT.Status.Hello.vi" but dialog's "OK" button stays greyed-out.)
    Cheers.
    Message Edited by tbd on 03-29-2007 03:15 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    VATStat.JPG ‏54 KB

    Hi Aristos,
          Thanks for the reply!  It was a bit dissappointing, though.
    It appears the LabVIEW-class object will be moving away from (what seems to me) a convenient object-interface presented by the invoke-node/method paradigm - which allows us to interface with a large set of "objects" (.NET, ActiveX, LabVIEW GUI, VISA Resource, ?) in a similar manner and independent of the object's origin.  Being able to read the methods and parameters that appear in these nodes is also helpful for understanding diagram logic!
    I do like the option of dropping a friendly "VI looking" icon on the diagram, but perhaps an optional - even default - VI-icon representation for a class-object invoke-node is feasible - so the LabVIEW class-object could be the more generic object first, but with a traditional-G representation(?)
    Given the answer "We would like, someday, to support the property node"
    and "in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future",
    ... I guess you'll break the wire in the next version, but (perhaps) allow it again - if support of the property node is ever implemented?
    Regards.
    P.S. For the record, huge THANKS to whoever it was that straightened-out enumerated-types (somewhere) between LV4.1 and LV6.1.  Every time I add or remove an enumeration in a typedef, I silently give thanks to the bright and thoughtful soul(s) who made this valuable tool work so well!
    Hello. This is your friendly neighborhood R&D guy for LabVIEW classes.
    Regarding your request about property and invoke nodes as relates to LV classes....
    Short story: We would like, someday, to support the property node. We have no intention of ever supporting the invoke node.
    Long story: As we were creating LV classes, we had to evaluate the right programming interface for these things. We wanted LV classes to behave as new data types in LV. A developer should be able to create a LV class, then give it to someone who doesn't even know OO programming, and that second programmer could use the new data type without learning a lot of new concepts. From this principle, we held fast to the idea that the programming interface should be subVI calls whereever possible. The invoke node is really nothing more than a VI minus the icon. If you want, you can popup on any subvi node and uncheck the option "View as Icon". This will make the node display in a way that has the terminals listed as text, like the invoke node. So, at the end of the day, the invoke node is simply a subroutine call in LV that is language dependent, as opposed to the language independent iconography of LV generally.
    The property node is a slightly different story -- the functionality of a property node is actually different than an invoke node as its terminals are various subsets of the properties available, not a fixed list of parameters like the invoke node. The property node provides a nice interface for setting multiple properties in a block and only having to check a single error return. Very friendly. Our intent is to allow you to create a VI that has 5 terminals: object in, object out, error in, error out, and either a single input or a single output of your chosen type. VIs with this conpane could be marked as "properties" of the class and would show up when you wire the class wire to the property node. We would call the subVIs behind the scenes as needed to get/set the properties.
    This is on the longer term roadmap because it is "syntactic sugar" -- it sweetens the programming style, but it is not necessary to program effectively. You can get the same effect by writing those same VIs and stringing them along on a block diagram "railroad track" style. We'll probably get around to it in three or four versions of LV -- there are some major user requests that impact functionality that have to get done first.
    PS -- in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future of people thinking there's a way to use these nodes.
    Message Edited by Aristos Queue on 04-02-2007 09:56 AM
    Message Edited by tbd on 04-03-2007 12:39 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • How to name a new Excel worksheet using an invoke node??

    I want output from my specific labview code to be written to a new and specific worksheet (meaning I want to provide the specific worksheet name) of an Excel spreadsheet my LabVIEW code will generate. My code will run in a loop where I want data that is generated in each pass of the loop to be written to a new worksheet each time through the loop. I know how to do this if I am ok with just having each worksheet be named 4, 5, 6, etc (on top of the 1, 2 and 3 that comes standard with a new Excel spreadsheet) but I want more meaningful names than just those numbers... So how do I add a new worksheet and give it a name of my choosing??? Also, when right click on an invoke node and then click on "Help for Item" which is right under the Methods selection that comes up, nothing happens, meaning I am not directed to any help file. I see that same behavior under LabVIEW 6.1 and also under LabVIEW 7.1. My guess is either I didn't buy some option required to have that help area be populated or I had it as some option but didn't know to install it when I originally installed LabVIEW??? Having that help available might help answer the question I pose above... I find working with ActiveX components to not be straightforward. Granted I haven't done it much and what I have done has been sort of follow examples and get it to work... But on this naming a new worksheet I have found no useful examples. My guess is it's easy but I'm clueless... Any help would be much appreciated... Note, in case it matters, I do not own the Report Generation tool/capability... thanks... bob...

    Hi, Paris1:
    Take a look at "Excel Workbook Properties", that is located in
    REPORT GENERATION
    -> EXCEL SPECIFIC
    -> EXCEL GENERAL
    -> EXCEL WORKBOOK PROPERTIES
    One of its outputs is "Current Worksheet Name".
    You can insert a ExcelWorkbookProperties VI in a blank VI and then double-click it.
    You will se a rose vi named Excel Get Properties
    And inside it (double-clicking it), the way Worksheet's name is got. If you "Change to Write" that property node, you can set it's name.
    This way is very complicated, it can be done faster, but this way you can see a process to do that, and checking it, you can build your own excel VIs to do specific tasks.
    Hope it helps,
    Aitortxo.

  • Invoke node error in PDSF vi

    Iam using NI datalogger,for reading analog and digital inputs.In this datalogger there are many sub VIs.when i run the data logger iam getting the errors like, the sub vi PDSF_logistics.vi(process data standard format )is not executable.The error what it is showing is
    Invoke node:Invalid method
    The method selected in the invoke node is invalid or no method has been selected. Right-click the invoke node and select a method.
    Invoke node:Invalid refnum class
    The refnum class that is being passed into this node is not fully defined. This is because the refnum is defined using external files, and one or more of these files are missing.
    Iam attaching the VI please have a look in to it.
    Attachments:
    PDSF_Logistics1.vi ‏75 KB

    Hello dilreddy2001in:
    It seems that the activex reference is not attached to an activex class.
    In the front panel:
    1] Right-click "refnum"
    2] Go to "Select ActiveX Class"
    3] Click "Browse"
    If you copy/pasted it from another VI, you might as well do the same in order to determine the ActiveX Class.
    I hope that this helps.
    Good Luck...
    PS
    You also forget to attach 'PDSF_ErrorText.vi'

  • ActiveX variant to LabVIEW variant

    Hi Ppl,
    I'm reading ActiveX data from an application(TestStand) in LabVIEW. The data I get is of the type ActiveX Variant. When I use variant to data node I'm able to convert the data to the corresponding data type. Howevere in my application the data type varies dynamically and I cannot use the variant to data node.
    I will have to flatten it to string. But the flatten to string node does not work with ActiveX variants. It only works with LabVIEW variant types. So is there any way that i could convert ActiveX variant types to LabVIEW variant. I tried the to variant node too. I too does not convert it as expected.
    Thanks,
    Sathish
    Here is how both the variant types differ
    Activex variant (boolean):
    '': OLE Variant 
    Variant Type -> VT_BOOLValue -> FALSE
    LabVIEW variant(boolean):
    'Boolean': boolean (TRUE or FALSE) 
    FALSE

    Hi lordsathish,
    Unfortunately, there is no way in LabVIEW to access type data for OLE/ActiveX variant data.  However, you can obtain information about the datatype of a TestStand PropertyObject using the ValueType method:
    myObject.Type.ValueType
    This will return the data type (see the ValueType help entry for more details).  you can then use the specific type methods (getValBoolean, etc) to extract data.  In the case that you have an array, you can use the ArrayDimensions and ElementType to extract the data from the array.  In the case of a container, the contained items will be considered propertyObjects, so you can use the getNumSubProperties and getPropertyObject methods to access the contained items.
    Refer to the PropertyObjectType reference help for details on these methods
    I hope this clarifies!
    Al B.
    Staff Software Engineer - TestStand
    CTA/CLD

  • Error 10000 at invoke node

    There is an Error 10000 happened at invoke node in one of my subvi. Please see attached snapshot of the error message.
    This program(VI) has run for one month, and yesterday  this error happened first time.  After I stopped the VI, and ran it  again, there was no error anymore.
    Can anybody tell me possible causes?  Thanks.
    WT
    LV2013SP1
    Attachments:
    Invoke Node error at CallSubVI_Do.PNG ‏36 KB
    Call_Subvi_Do(variant).vi ‏20 KB

    weitong wrote:
    Thanks. But, I didn't get what you said.
    I am using "Call_Subvi_Do(variant).vi " to open and run another VI.  Which one I should check the state of by using the Property node "Execution>State>Idle",  "Call_Subvi_Do(variant).vi" OR the VI called by Call_Subvi_Do(variant).vi? By the way, the error is promted happening at the Invoke node in "Call_Subvi_Do(variant).vi" .
    Yes on the top its happens in the sub VI but when you debugg the sub VI you may find that error occuring at the onvoke node "Run VI". Check the attached VI with added check for the state of the VI.
    The best solution is the one you find it by yourself
    Attachments:
    Call_Subvi_Do(variant)_Anand.vi ‏21 KB

  • How can i save the output array of the invoke node "commands values" into a specific file

    I must save the setup of vi commands'. I use an invoke node called "command value" wich give me an array with the name of the specific command and his value. How can i save this array into a specific file to load it later if o need. Must i change the array format?
    Thank you

    Hi,
    I have attached two VIs.
    The first one "Ecriture fichier tableau" (writer) permits to collect all control's values in an array (dbl) and to save it as .bin file. You had to convert variant type into dbl type. (You can do the same with string type if you wish. You will save datas as .txt file for example)
    The second VI "Lecture tableau fichier" (reader) permits to retrieve all the datas you saved in the file.
    I think this responds to your question.
    Regards,
    Attachments:
    Control values.zip ‏26 KB

  • Cancel or abort invoke node that hangs up

    Hello,
    i use an invoke node to grab an image from firewire camera. camera in trigger mode.
    application hangs up when trigger signal fails. running VI in highlight execution mode shows that "IICImangingControl, MemorySnapImage" (upside left) hangs up.
    VI cannot be cancel with abort execution button.
    target: abort invoke node in case of timeout (error handling)
    question: how can i abort hanged up invoke node?
    timon
    Attachments:
    GrabPicture 02.tg.vi ‏97 KB

    The camera code is an ActiveX/COM DLL that you are calling out to. Unfortunately, when a thread leaves LabVIEW and calls external code, we have no control over it anymore. When you abort the VI, we'll stop the code execution, but we have to wait for the COM DLL to release the thread.
    Being able to do this is outside our control, unfortunately. You should look at the camera API, or talk to the vendor, about a method that either has a timeout or is asynchronous in nature.
    Brian Tyler
    http://detritus.blogs.com/lycangeek

Maybe you are looking for

  • T400 windows 7, blue screen memory_management and IRQL_NOT_LESS_OR_EQUAL

    Hi can anybody help me solving this problem? I have T400 with windows vista 32. I upgraded it into windows 7. And now my laptop is having problem with the blue screen when the windows started it says about memory management or IRQL that asked me to d

  • E-mail generation for errors in FEBA or FEBAN

    Hello, Is it possible to send an e-mail when the bank statement is posted in SAP through FF.5 and the statement resulted in errors that would eventually needs to be corrected in FEBA or FEBAN ? Thanks, Raja.

  • Can I use Airport Express with iPhone in my hotel room?

    Is there a way to set up an Airport Express in my hotel room when I travel, so that the provided High Speed internet cable in the room can be plugged into my Airport Express, giving me a wireless internet connection for the iPhone? I use Airport Expr

  • Performance Issue in MIRO Transaction

    Dear All, Our end user has been complaining of MIRO taking too much time to pass an entry. What could be the reason behind the same?? Please suggest possible solutions. Regards, Alok.

  • h:dataTable Scrollable with header fixed

    Hi all! I have been reading for hours in these days all posts about this topic but I am not able to create a scrollable <h:dataTable>. My table must scroll both horizontally and vertically, and the header should behave consequently and this should ha