Jump to content

Darren

NI
  • Content Count

    579
  • Joined

  • Last visited

  • Days Won

    48

Posts posted by Darren

  1. I've only ever used Class Operator in conjunction with the Traverse method. You set an operator VI that runs whenever the Traverse method finds an object matching the class name you specify. For my Traverse VIs, the operator VI is very simple...it just adds the found object's reference to an array. I know other people have written their own traversal algorithms that have the operator VI do a lot more stuff when it finds the object.

    The following VI is available in LabVIEW 2010 and later...you should be able to dig through it to find out everything I know about the Class Operator and Traverse methods:

    <LabVIEW>\vi.lib\Utility\traverseref.llb\Traverse for GObjects.vi

  2. I had this issue in the Quick Drop window. And for reasons I can't remember now, I wasn't able to use a system combo box. So my solution was to have a frame decoration, with the same color as the panel, that I position exactly where that ugly black box would be. And the decoration is higher up in the panel order than the combo box. So when I assign key focus to the combo box, you don't see the ugly black border because the panel-colored decoration is above it. I also have to resize this decoration on a panel size, to ensure it's always surrounding the combo box at exactly the right size.

    Programming UIs in LabVIEW is fun!

    • Like 1
  3. How about this?

    Very nice...I always use the VariantDataType VIs, and have never thought about using Flatten to XML to get more info out of a refnum than what those VIs provide. Your approach looks solid...find the <Name> tag under the <ActiveXType> tag and you should be good:

    <LvVariant>
    
    <Name>Variant</Name>
    
    <Refnum>
    
    <Name>ActiveX Container</Name>
    
    <RefKind>ActiveX</RefKind>
    
    <ActiveXType>
    
    <GUID>{9B4CD3E6-4981-101B-9CA8-9240CE2738AE}</GUID>
    
    <Name>Acrobat.CAcroApp</Name>
    
    </ActiveXType>
    
    <Val>0x00000000</Val>
    
    </Refnum>
    
    </LvVariant>[/CODE]

    It's not often these days that I get to add something new to my LabVIEW bag of tricks... ;)

    • Like 2
  4. Sorry, I didn't mean to offend. I have deep respect for fellow yak-shavers. Maybe some day we can exchange yak-shaving tips, goodness knows I've got a few.

    As for your scripting question...unfortunately, there is no way to programmatically change the image in a decoration. You have two options that I can think of:

    1. If the new image is on the clipboard, you can use the "Paste" method of the TopLevelDiagram class and paste it in the same location as the existing decoration, then delete the old one.

    2. If the new image is in a file on disk, then you read it in, and set the value of a picture constant on the diagram instead of a regular decoration.

  5. As a result of the great "Config VI Refactoring Debacle", I come down strongly on DISCOURAGING any use of VIs that are not in the palettes unless you copy them to a new location on disk and use them from there. I'm pushing to have the Variant Data Type library added to the palettes in LV 2012 so that it is no longer under this interdict.

    And as most people know (based on the content of many of my weekly nuggets, as well as my penultimate response on AQ's thread linked above), I often *encourage* people to use VIs that are not in the palettes/Quick Drop. I would venture to say that, since the config VI debacle (which occurred with the LabVIEW 2009 release), we haven't had any major upgrade problems associated with changed interfaces to VIs...our developers are more well-informed of the issues, and we have processes in place that analyze our shipping VIs for interface changes between versions.

    Seeing this mention of the Binary Search Pt-by-pt VI, which I would never have found, I was wondering if anyone has a list of all the vi.lib VIs that are not contained on any of the default menus? Even better, menus that expose them? Or add them to Quick Drop?

    Jarrod wrote a great Quick Drop Keyboard Shortcut that allows you to easily add a selection of code (which could just be a single VI) to the user palettes so it's accessible with Quick Drop. You can get it here.

    • Like 1
×
×
  • Create New...

Important Information

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