Jump to content

Saverio

Members
  • Posts

    137
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Saverio

  1. I think you put the commas in the wrong place. It's on the hidden label of a visible constant. However the label has been moved away from the constant.

    Ton

    Sorry, mean to say "constant" instead of terminal. But it's still the same. Once you right-click on the constant and make the label visible you can move the constant until you see the label (in case it got shoved way out there beneath another structure) so that you can get your grubby little hands on it. Though as noted, it seems it was just easier to just delete the constant and recreate it.

  2. Technically, it's not broken behavior. The cluster contains two references, but they're different kinds of references. Hence, the Cluster to Array is complaining, since it only works when the cluster contains elements of the same datatype. You can see in the Build Array that there's data coercion on both so that they are being "downcast" to the common datatype of a "lowly" "Control Refnum".

    You could make the case that the Cluster to Array should be "smarter", but that's a different question, and I think posting it as an idea is a ... good idea.

  3. codeproject.com has several articles on doing impersonation in .NET for this sort of thing. I used one of these in the in-house application I developed at work.

    Here's one: http://www.codeproject.com/KB/cs/cpimpersonation1.aspx

    and another: http://www.codeproject.com/KB/cs/zetaimpersonator.aspx

    and another: http://www.codeproject.com/KB/dotnet/UserImpersonationInNET.aspx

    Thus, you could take that code and use the assemblies they provide.

  4. There should be an ad there, between the first and second topics. If you have some kind of ad-blocker, or if some ad doesn't load for some reason, I guess it would create that kind of gap.

    Ah, that might explain it. Yes, I have AdBlock Plus with Firefox.

  5. See attached image. You have to click on the dot next to the post title.

    OK, but I was confused by this as well. Having to click on the dot didn't seem to be intuitive. It just looked like, well, a dot.

    I also noticed that the Unread Content seems to have been wiped. When I went in this morning it showed there was no unread content from my last login, which was late last week, and I know there have been posts since then. Like this one. Just FYI. I'm assuming the Unread Content will work correctly at this point going forward.

    I notice one formatting issue: On the Site News main page there's extra space on one of the threads (see attached). Unclear as to why. I did perform a cache clean.

    post-3256-0-33053200-1313414893_thumb.pn

  6. You cannot send messages from a process that has lower-level access (such as user-level) to a process that has higher-level (such as admin-level) access. However, I don't believe that launching osk in the fashion that I had provided would cause it run under admin privilege. I don't have time to play with this this morning, but I'll try to look at it later this afternoon.

  7. Yes, you may need admin privilege, depending on the task. The taskkiil command has a /u and /p parameter for specifying a username and password to use so the command can be run under that account. Of course, if it's the admin account, anybody who can see the code would also see the password...

    An alternative is to send the window the WM_CLOSE message, which tells it to close. You can do this with the SendMessage Windows API function, as shown in attached example.

    Send WM_CLOSE Message.vi

  8. Saverio

    1. Thank you for sharing your solution. I have to notice that if it allows much more option, it's not cross-platform and can be difficult to maintain over the year

    I agree that it's not cross-platform. Unfortunately, a cross-platform solution would need to be implemented by NI directly in LabVIEW. Until then, we're sort of limited to the tools we have at our disposal. :(

  9. Is it just one number that you're getting or do you get an array of numbers? Is the set of bits that you don't care about always the same set of bits? If so, you could simply mask out the bits using a simple AND function with the required mask. For example, if you just want bits 0 and 1 you can mask your measurement by ANDing it with 0x03.

    Alternatively, you can use the Number to Boolean Array to convert your U8 to an array of 8 Booleans.

  10. Is it a .NET Invoke Node or an ActiveX Invoke node? If you show the Context Help window and place the wire tool on the wire that's connected to the reference input you should see the class name in the Context Help window. You should be able to determine then if you're dealing with an ActiveX class or a .NET class. If it's an ActiveX class then the DLL would most likely need to be in the C:\Windows\system32 folder. If it's a .NET class then the assembly would need to be in the GAC or in the same folder as the VI.

  11. Ton is correct. You have to set 'bar' and 'baz' to be 2D arrays because of the way LabVIEW populates arrays. LabVIEW has no concept of vectors, so rows and columns are the same with respect to 1D arrays. The alternative is to change your Matlab code to : bar=foo(:,1)'; (i.e., transpose it inside of the script). Then 'bar' and 'baz' can be 1D arrays.

  12. Yeah that is the one. Thanks for the responses.

    I haven't done much with activeX before this. Is there a lot of difference between using one or the other? Also is there good way to handle the version of office changing?

    There is a difference since the object models are not the same, so they would program differently. It's quite similar to the Excel object model, though, so there are more similarities than differences. The Office Spreadsheet control is part of the Office Web Components. That control cannot read/write Excel workbooks (though you can export the contents of the spreadsheet control to an Excel file). Don't ask me why, that's just the way Microsoft designed it. What's it good for? Well, other than presenting a spreadsheet-like control on an application window, I have no idea. If you have to read/write Excel workbooks then you should either invest in the Report Generation Toolkit, or look over the examples that are available on this site as well as in the Excel thread over at the NI site. Please note: DO NOT POST QUESTIONS IN THE EXCEL THREAD. It is meant to be a repository of links only.

    As far as handling the changing of the version of office... no, there's no real good way to handle this. At least none that I have found, though others may have found a suitable solution. Ultimately I believe this is a limitation of ActiveX component "versioning".

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.