Change strings of (strict type def) refnum

mitulatbati wrote in http://forums.ni.com/ni/board/message?board.id=170&thread.id=233257&view=by_date_ascending&page=5:
Hi,
I have made a strict type def, which is a text ring. I open the VI reference -> get Panel property node -> Controls[] -> Index first element (there is only one, the ring) -> change Strings and values, and then close reference.
If I call this subvi from a VI, which includes this strict type ring, it will be only updated, when I restart the VI. And not in runtime. I don´t get any error, everything looks fine, but the strings and values are not updated :-(
Is there a way not to restart the VI, but to modify the ring programatically?
regards
MB
Message Edited by shb on 07-29-2008 11:52 AM

Hello mitulatbati,
I do something similar with a Combo Box. The reference to each box is stored in an unitinialised shift register of a VI. When I want to change the selectable text, I do it in a for loop for every stored control.
A VI doeing this for Rings is attached (LV8.2.1).
Greetings,
shb
Attachments:
Demo - Update Ring synchron.vi ‏21 KB
Update Ring synchron1.vi ‏14 KB

Similar Messages

  • How to change the font color in a strict type def programatically

    Could someone suggest a way to change the font color of a string indicator in a strict type def cluster programmatically? The cluster contains a label that is color-coded to match the function of the data channel represented by that cluster.  The function of each channel is not predetermined, so the font color needs to be changed programmatically.  To represent all channels, I have arranged a large cluster that contains 100 instances of the control.  This makes it essential that the control be strictly type defined in order to change the layout of the clusters uniformly.
    Can anyone suggest either a method by which I can let the control remain a strict type def and change the font color, or a method by which I can programmatically change the control from a strict type def to a type def?  Currently, I am saving the control as a strict type def every time I make a change and then saving it again as a type def when I am ready to run the program.  This works fine, but just seems inelegant.  This color-coding is used throughout the program in various indicators, so a neat solution would be greatly appreciated.

    As mentioned in my Nugget on Type definitions you can create strict type-defs that contain type-defs.
    If you make your data definition a type and put that definition in a strict type-def (one of each flavor) you can use the appropraite strict type where each is required.
    Yes the data structure will have another level of nesting so if you are "too far gone" you may not like this idea.
    Otherwise you can write a VI that opens the typed-def and do a "save as..." and use it everytime you edit the type-def.
    I hope something helps!
    Ben
    Message Edited by Ben on 10-06-2008 10:26 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Strict_of_Typedefs.PNG ‏30 KB

  • Array of strings strict type def not updating

    I have defined an Array of Strings (ctrl) as a strict type def. When I update this array (add another string to it) the values don't update where this control is used. Can someone please explain why this is occuring.

    Only the size of the array _shell_ is locked, not the size of the array data. The array shell is a window into the data of the array control. If you change the value of the index display you will change the indices visible inside the array shell.
    -Jim

  • How can I change the numeric and enum default values in a Strict Type Def Cluster?

    I have a Strict Type Def cluster that contains 10 Numerical controls and a number of enums.  I have edited default values of the numerical controls in the Strict Type Def, in customize mode, performed a "Make Current Values Default"  and have done a "Apply Changes"  and saved.
    This cluster is used in various locations throughout the project and have not found a way to make the cluster default values change downstream.  The Strict Type Def (STD) Control appears to have the right values on the front panel.  But if I place an instance of this on a blank front panel, and run a wire from it in the block diagram with a probe and indicator, I still get the old default values being passed from the STD.  
    Solved!
    Go to Solution.

    There Are No Strict Type Definition Constants
    "Even though typedefs only update when types change, instances get cosmetic changes from the definition whenever they update. So one trick to "push" changes to typedef instances is to change the data type, apply changes, and then change the data type back. [edit, March 26 - Note that the typedef instances need to be in memory when you use this trick]."
    From Eyes on VIs, here.
    http://blog.eyesonvis.com/
    I love this article.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Setting control to default value when it is a strict type def

    If my subVI has a control that happens to be a strict type defined cluster and I have saved the values in the control as the default values, how can I change them back to the default values of the type def (which are empty).  Because it is a strict type definition, i cannot click on the elements inside the cluster and modify them (e.g. click on an array inside the cluster and do an empty array operation.)
    In the attached screenshot, the control "BLE Meters To Test" is just an array of clusters and I was able to empty the array.  The control "Capture Data" is a strict type def.  I would like to clear the contents of this control without having to delete the control and add it back with a new instance of the same strict type def.
    Solved!
    Go to Solution.
    Attachments:
    screenshot.PNG ‏33 KB

    are you talking about edit mode or run mode?
    You could temporarily add a second instance of the typedef (all empty), then change it to a constant. Whenver you need to reset at run time, write the new digram constant to a local variable of the control.
    glstill wrote:
    Because it is a strict type definition, i cannot click on the elements inside the cluster and modify them (e.g. click on an array inside the cluster and do an empty array operation.)
    Make sure to click on the array container, not on the array elements.
    LabVIEW Champion . Do more with less code and in less time .

  • About Strict Type def

    Hii
      i have created a cluster of ring control as a strict type def.Also i have used a constant of that cluster in my program where  i need.Now am changing the items in that ring control by opening the strict type def.I am giving Apply changes , save and all.Now the cluster in my program is changed.But my constant remains unchanged.;..How can i update a constant...

    The wonders of searching (and that's just one of the results for my simple search).
    Try to take over the world!

  • Sort Second Element in Array of Strict Type Def Clusters

    I need to sort the an array of strict type def clusters by the second or third element in the cluster.  In the past I have used 1-D array sort and sorted by the first element of the cluster.  When I need to sort by the second, third, or fourth element of the cluster I just break down the cluster and rebuild it placing the desired sort element in the first position of the new cluster.  This works for simple tasks and clusters, but as the cluster gets more complicated this becomes a pain to do this.  There must be a cleaner way to sort by other elements within the original array of strict type def clusters.  Has anyone succeeded in doing this a different way?

    Hello,
    Here's the way I would do it...just create a new cluster array, where each cluster contains two elements...the unbundled item you want to sort by, and the cluster itself.  Then sort the new cluster array, then unbundle the sorted cluster array to get the original clusters (now sorted).  Here is a screenshot:
    There may be a better way, but this is the first thing I thought of.
    -D
    Message Edited by Darren on 03-16-200610:00 AM
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    Sorted_cluster.jpg ‏30 KB

  • How can I Change data in a type def control containing a Xcontrol with a local variable

    Hello
    I made a Xcontrol and I inserted this control in a type def.
    When I want to change the control's data with a local variable in a VI, the VI change nothing. The change of data isn't perform
    How can I correct this issue?
    Thanks for your help
    Solved!
    Go to Solution.

    Hello,
    What's your LabVIEW version ? Do you have a simple example program which demonstrates this behavior ?
    I found another discussions related to your issues with Xcontrols:
    updating type defs in Xcontrol Facade
    No Data Change event generated for a XControl in a Type Def
    XControl facede.vi 
    Hope this helps.
    Regards, 
    Steve M.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Vidéo-t'chats de l'été : présentations techniques et ingénieurs pour répondre à vos questions

  • Change "String" into data type "Date"

    Hi,
    I have created a report containing several date fields for a plan/actual comparison. The connection is built up by using the jdbc connector.
    My problem is that the date fields are only displayed as String, but I actually want them to be displayed as Date type.
    Here an example:
    Right now the date fields are displayed like this "20060411"
    but I want them to be displayed like this ("11/04/2006", or similar).
    I would appreciate any suggestions to solve this problem!
    Cheers
    Thomas

    Hi Thomas,
    Check out the following links :
    http://help.sap.com/saphelp_nw04/helpdata/en/55/55a34098022a54e10000000a1550b0/content.htm
    http://help.sap.com/download/netweaver/nw04/visualcomposer/VC_60_UserGuide_v1_1.pdf
    Re: Custom message in VC
    Thanks in advance,
    Deep.

  • Type defs changes not reflected in block-diagram constants?

    I'm struggling with strict type-defs today.
    If I create a strict type-def, say of a cluster with an enum in it, and save it. Then create a block-diagram constant from the strict type-def in a blank vi. Then make changes to the strict type-def (say, add another item to the enum), the block-diagram constant ghosts out , as it should. If I then select "Apply changes" from the strict type-def menu, the ghosted block-diagram constant becomes un-ghosted, as it should. BUT, it hasn't update!? If I look for the new item in the enum, it isn't there!? I'm sure it should be, right?
    No changes that I'm making to my type-defs or strict type-defs are being reflected in my block-diagram constants (which are definitely still linked to the controls with "Auto-update from type-def" checked on). It does work for front panel controls and indicators though - just not block diagram constants.
    I'm using LabVIEW 8.5.1, Win XP Pro. Any ideas anyone?
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

    Solved. I think.
    I tried a range of type-defined controls, including an enum, a ring list, a cluster with an enum inside it, and a cluster with a ring list inside it.
    Changes to the enum items were reflected in all vi controls and block diagram constants.
    Changes to the ring list items were not reflected in the controls or block diagram constants.
    This snapshot shows the the last item available in each ring and enum list. Clearly the rings were not updated when the custom controls were. (Yes, I applied changes and saved too).
    Switching to strict type-defs only impacted  the front panel controls, as Ben highlighted, because this is GUI related. You can see from this second snapshot where all type-defs are now strict type-defs that all enums and rings updated to reflect all three items, but the block diagram rings are still out of date
    I expect somebody will tell me now that this is normal behaviour??? 
    Message Edited by Thoric on 09-10-2008 02:31 PM
    Thoric (CLA, CLED, CTD and LabVIEW Champion)
    Attachments:
    custom_control_test.jpg ‏53 KB
    custom_control_test_stricttd.jpg ‏54 KB

  • No Data Change event generated for a XControl in a Type Def.

    Hello,
    Maybe I am missing something but the Data Change event of a XControl is not called when the XControl is used in a Type Def. or Strictly Type Def. (see the attached file).
    There may be some logics behind it but it eludes me. Any idea of why or any idea of a workaround still keeping the Type Def. ?
    Best Regards.
    Julian
    Windows XP SP2 & Windows Vista 64 - LV 8.5 & LV 8.5.1
    Attachments:
    XControl No Data Change event.zip ‏45 KB

    Hi TWGomez,
    Thank you for addressing this issue. It must be a XControl because it carries many implemented functions/methods (though there is none in the provided example).
    Also consider that the provided non-working example is in fact a reduction of my actual problem (in a 1000-VI large application) to the smallest relevant elements. In fact I use a  typedef of a mix of a lot of different XControls and normal controls, some of them being typedef, strictly typedef or normal controls and other XControls of XControls (of XControls...) in a object oriented like approach...
    Hi Prashant,
    I use a typedef to propagate its modifications automatically everywhere it is used in the application (a lot of places). As you imply a XControl would do the same, though one would like to construct a simple typedef when no additional functionality is wanted.
    The remark "XControl=typedef+block diagram" is actually very neat (never thought of it that way) because it provides a workaround by transforming every typedef into a XControl. Thanks very much, I will explore this solution.
    One issue remains: All normal controls update their displayed value when inserted into a typedef but not XControls. Data change event is not triggered. I known that XControls have some limitations (no array of XControls) but I would say, like TWGomez, that this is a “bug” considering the expected functionality.

  • How to edit the appearance of one instance of a type def (not strict)?

    Hello,
    I would like to edit the appearance of a control (changes which require using the LV control editor).  Unfortunately, this control is an instance of a (non strict) type def.  How do I do this, without editing the appearance of the type def itself?
    Thanks,
    Jaegen

    Hi Jaegen, this worked for me...
    Open the typedef - don't worry, you aren't going to _save_ changes
    Edit typedef as needed
    [When done editing] copy connector-pane (select, ctrl-C)
    File\Revert !!!
    Select target-control and paste!
    In LabVIEW 7.1, the edited/pre-reverted ... ouch ... control appears (and still connected to typedef).
    Message Edited by Dynamik on 11-16-2005 08:22 PM
    Message Edited by Dynamik on 11-16-2005 08:23 PM
    Message Edited by Dynamik on 11-16-2005 08:24 PM
    When they give imbeciles handicap-parking, I won't have so far to walk!

  • Changes to Text Ring Items in Type Def not Updated in Copies

    In LabVIEW 2010, I have Type Definition which is a Cluster that contains several Controls including a Text Ring control.
    If I go into the Type Definition and Edit the Items in the Text Ring, those changes to the Items in the Text Ring do not show up in the "copies" of the Type Definition control on my Front Pane, even though the "Auto-Update from Type Def." feature is checked.
    How do I get changes to the Items in a Text Ring in a Cluster in a Type Definition Control to show up in all of the "copies' of the Type Definition on my Front Panel?
    I shouldn't have to edit the same Items in the same Text Ring in multiple places.

    What you see is normal behaviour of rings. The general advice is to use an enum instead of a ring. Rings are useful as FP elements which you want to populate during run-time.
    I guess this is the best option you have, replace the ring by an enum inside your type def and hope it's all fine...
    Another option you can try if you need to have it as a ring, is to make it a strict type def. I'm not sure but I would expect it to propagate the ring text to all instances. On the other hand, you can't programmatically set the ring text as long as it's a strict type def, so to get the bahviour of a ring again, you will need to revert back to a normal type def.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • What are type defs used for?

    I am learning about type defs and wanted to ping the community to get a feel for what expanse of things they are useful for.  Any and all comments are welcome.
    Cheers!
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

    I found this (from LV Help) enlightening as to the differences between typedefs and strict typedefs:
    Type Definitions and Strict Type Definitions
    Use type definitions and strict type definitions to link all the instances of a custom control or indicator to a saved custom control or indicator file. You can make changes to all instances of the custom control or indicator by editing only the saved custom control or indicator file, which is valuable if you use the same custom control or indicator in several VIs.
    Type Definitions
    Type definitions identify the correct data type for each instance of a custom control or indicator. When the data type of a type definition changes, all instances of the type definition automatically update. In other words, the data type of the instances of the type definition change in each VI where the type definition is used. However, because type definitions identify only the data type, only the values that are part of the data type update. For example, on numeric controls, the data range is not part of the data type. Therefore, type definitions for numeric controls do not define the data range for the instances of the type definitions. Also, because the item names in ring controls do not define the data type, changes to ring control item names in a type definition do not change the item names in instances of the type definition. However, if you change the item names in the type definition for an enumerated type control, the instances update because the item names are part of the data type. An instance of a type definition can have its own unique label, description, default value, size, color, or style of control or indicator, such as a knob instead of a slide.
    If you change the data type in a type definition, LabVIEW converts the old default value in instances of the type definition to the new data type, if possible. LabVIEW cannot preserve the instance default value if the data type changes to an incompatible type, such as replacing a numeric control or indicator with a string control or indicator. When the data type of a type definition changes to a data type incompatible with the previous type definition, LabVIEW sets the default value of instances to the default value for the new data type. For example, if you change a type definition from a numeric to a string type, LabVIEW replaces any default values associated with the old numeric data type with empty strings.
    Strict Type Definitions
    A strict type definition forces everything about an instance to be identical to the strict type definition, except the label, description, and default value. As with type definitions, the data type of a strict type definition remains the same everywhere you use the strict type definition. Strict type definitions also define other values, such as range checking on numeric controls and the item names in ring controls. The only VI Server properties available for strict type definitions are those that affect the appearance of the control or indicator, such as Visible, Disabled, Key Focus, Blinking, Position, and Bounds.
    You cannot prevent an instance of a strict type definition from automatically updating unless you remove the link between the instance and the strict type definition.
    LabVIEW 8.0.1; WinDoze XP
    aut viam inveniam aut faciam

  • Data Log File Refnum Type Def Bug??

    Hello,
    I just found some quirky behaviour (LV 7.1.1):
    1. In the attached LLB, open "RefnumVI.vi"
    2. Select the Data Log File Refnum control and open it for editing (Edit - Customize Control ... from the menu)
    3. Close "RefnumVI.vi" but leave "Refnum.ctl" open
    4. Select the enum inside the refnum container, and open it
    5. Select File - Save As ... and save the enum as "RefnumEnum2.ctl"
    6. Close the enum
    7. Save "Refnum.ctl", and close it
    8. Reopen "RefnumVI.vi" and display its hierarchy (Browse - Show VI Hierarchy from the menu)
    Notice that "RefnumVI.vi" still has a link to "RefnumEnum.ctl", even though we saved this as "RefnumEnum2.ctl" earlier.
    If you go back to the VI, right click on the refnum, and replace it with itself (i.e. select "Refnum.ctl"), the link disappears.
    This behaviour does not happen if I use a Cluster instead of a Data Log File Refnum.  I imagine the difference is that the calling VI needs to know about the structure of the data log file in ways it doesn't need to know about the structure of a cluster, but this still is very counter-intuitive behaviour.  Is this really expected?  Or is it a bug?  Is there any other way to remove the link?
    Cheers,
    Jaegen
    Attachments:
    RefnumEnumBug.llb ‏22 KB

    Nathan,
    Thanks for your response - I have 8.2 and am in the process of evaluating how/when to upgrade.
    Does this mean that the compiler/linker is behaving differently depending on where you open a type def from?  The reason I'm asking is that I've seen similar behavior when editing a hierarchy of type defs; depending on how I open the low-level type def I'm actually editing, changes will or won't get propagated to other instances properly.
    Regarding this actual problem, the issue I had is that the data log file refnum type def exists on many VIs, and thus the incorrect link now exists on many VIs, and I don't see any way of correcting the problem without manually replacing the type def with itself in every location (given there's no "Replace All" feature in LV 7.1.1 ).  However, the hierarchy I'm dealing with was only created for testing, so I don't actually need to fix it .  I'll just know to avoid causing this problem in the first place in the future.
    Jaegen

Maybe you are looking for

  • Report problem

    Hi, I have report which is having two columns job start date is in one table and job id is another table job startdate, job id 01-Feb-2013 06:12:33 AM,121 02-Feb-2013 08:30:00 PM,122 01-Feb-2013 11:30:00 PM,121 02-Feb-2013 09:12:33 AM,122 03-Feb-2013

  • Out of Memory - Indesign 2.02 for Windows

    Hello. Probably been asked before but how do you resolve the "out of memory" (clipping path) problem when you are using InDesign for Windows? - see that there is a fix for Mac but can't find one for Windows 7 - is there a downloadable update availabl

  • Differences in USER_SNAPSHOTS and USER_MVIEWS

    Hi, We're using Materialized Views to do replication of several remote databases. This with Oracle version 10.2.0 on a windows server. I've noticed following result when checking status of our Materialized Views. In Oracle SQL Developer, a detail of

  • Lost Yahoo Toolbar, How can I reinstall it?

    Firefox kept on crashing. I was asked if I want to upgrade to a safer version. After the download I lost the Yahoo Toolbar. How can I install it?

  • Nokia 6280 Phone Software

    My mobile just gets restarted automatically while talking.I cant figure out under which conditions this happens but for past few days the frequency of rebooting has increased. Can anyone suggest me where i can download the Phone Software Update for N