Jump to content

candidus

Members
  • Posts

    109
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by candidus

  1. QUOTE (rolfk @ Apr 25 2009, 07:53 AM)

    He probably means that it is not anymore possible to drop in a single node that does the entire conversion for all datatypes automatically. With those VIs you might have to create a VI that makes explicit conversion in a case structure based on this enum and that will then not work for a new datatype in the next LabVIEW version without modification.

    Rolf Kalbermatter

    Thank you! That's exactly the point.

    Your answers, especially the first one, pointed me to another issue:

    My code example definitely mixes thing up, in a dangerous way:

    I mixed up "Flatten to String" and "Flattened String To Variant".

    These ones don't play well together, I just verified that they

    don't have the same representation for data string... :headbang:

  2. QUOTE (Aristos Queue @ Apr 24 2009, 10:37 PM)

    vi.lib\Utility\VariantDataType

    Thanks, I already looked at these but in my opinion they are less useful than TypeDescriptors were.

    OK, I can use the type enums returned by them and wire the values to case structures.

    But I'd prefer a generic solution which works with any type. This seems no longer possible.

    Or do I miss something?

  3. QUOTE (rolfk @ Apr 24 2009, 09:52 PM)

    Nothing. The new 32 bit typedescritors LabVIEW uses internally are not exposed in any way.

    Rolf Kalbermatter

    Oh, that's bad. :unsure:

    Is there any other way to cast a generic RefNum to a strictly typed one

    like in the above example? I know I could use "To More Specific Class"

    but the problem is that I want to get the target type from the RefNum, not hardcode it.

    Sounds weird, I know, but the piece of code above wasn't developed by me and it

    took me some time to understand what it should do...

    I know I could do something similiar using VI scripting (I tried it)

    but unfortunately my application shouldn't run in the IDE so that's not really an option...

  4. Hi there,

    we have a piece of code, developed in LV6.1 which also worked fine in LV7.1.

    It is used to "typecast" a control RefNum to a strict one via "Flatten To String",

    changing the type descriptor to the target RefNum type and "Unflatten String To Variant":

    post-15449-1240564800.png?width=400

    post-15449-1240564806.png?width=400

    The example above works in LV7.1 but not in LV8.0, at least not with a XYGraph control:

    If you change the control and depending RefNum in the cluster to something

    that already existed in LV7.1 it works even in LV8.0!

    I think it's something about the deprecated TypeDescriptor in LV8.0,

    perhaps the newly introduced types (like XYGraph, which was WaveformGraph before)

    don't return valid TDs.

    How to work around this issue? What is the preferred way to do type checking

    in LV8.0 without using old style TDs?

×
×
  • Create New...

Important Information

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