Jump to content

JKSH

Members
  • Posts

    494
  • Joined

  • Last visited

  • Days Won

    36

Posts posted by JKSH

  1. Thanks for your answers, everyone!

    Creating a VI based on an existing template and then replacing placeholder components was a clean and easy way to do things.

     

    You can always check out NI's GDS.

    Look in VI:

    C:\Program Files (x86)\National Instruments\LabVIEW 20xx\resource\Framework\Providers\Symbio_GDS\ClassProviders\Provider_LvNativeClass\ClassWriterNative_class\CreateMethod.vi

     

    I haven't installed the GDS; I believe it will be part of LabVIEW 2014? Anyway, thanks for the lead. I'm sure there's lots of gems to be found inside when I need to dig deeper.

  2. Hi all,

     

    I'm trying to programmatically create and modify LVClasses. So far, I've managed to do the following via LabVIEW scripting:

    • Create a new LVClass
    • Save the new LVClass to disk
    • Make one LVClass a subclass of another
    • Create property definition folders

     

    My next step is to create class methods (static dispatch for now), but I'm stuck. I can't figure out how to add an LVClass control/indicator to a VI. I tried the following, but LabVIEW complained, "Type mismatch: Object cannot be cast to the specific type".

     

    TTkTrDq.png

     

    I can't find any other LVClass-related items in the list.

     

    I tried to figure out what I should pass to New VI Object.vi, by querying an existing static dispatch VI as follows:

    bTx0Goa.png

     

    Apparently, the FP elements I want are called "LabVIEWClassControl", and they have a ClassID of 102. However, "LabVIEWClassControl". isn't available in the list. When I wired 102 into New VI Object.vi, I was told "The specified object was not found."

     

     

    How do I programmatically drop an LVClass control/indicator into a VI? More fundamentally, how do I script a new static dispatch VI?

     

    Thanks in advance!

  3. Thanks, rolfk!

     

    I tested your fix with Michael's test cases (with "ignore duplicate delimiters?" both TRUE and FALSE) -- they all produce the correct results.

     

    Do you know when this will make it into the VIPM?

     

     

    SourceForge is the best starting point in addition to this forum. However the project has not developed much over the last couple of years (there are quite a lot bugs filed with no development for almost a year). You could fork the project for your own purposes and upload patches as you file bug reports or maybe become part of the team yourself (if one of the members would allow that).
    The project might be dead, if none of the developers is interested in continuing it. In that case you could still fork the project, but there is little chance that anybody would benefit from patches (unless there is a way to fork a project and upload new versions to the VI Package Network...)

     

    I'd rather not fork, to avoid fragmentation. Do you know if there's a way for non-members to submit patches?

  4. A bit late to the discussion, but I'd like to add: I use comments to document the assumptions made when writing a section of code. As a piece of software grows (or if code is copied into another project), some earlier assumptions may need to be revised.

×
×
  • Create New...

Important Information

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