Create controls dynamically in schematic

Hi folks,
I'm a newbie to these forums!
Here's my problem: I'd like to create a schematic by giving the user a box of items (say circuit elements) that the user can drag and drop into place. The user could then set a property of the element, such as a COM port, and then a polling machine (separate) would say retrieve a value and display it in an indicator associated with the element.
I understand how to poll, say in modbus, and I understand event structures although I've only ever used them to detect a front panel click per the producer/consumer with events pattern. Any help in how to create a new control on the fly, as well as how to refer to it in order to update it regularly say, as well as how to drag and drop it, would be really appreciated!
Thanks,
Rik

Yeah you don't want to do that.  The question as it is right now cannot be done on a VI that is running.  Using Scripting you can programatically make controls but only on VIs not running, and only from the development environment, not in a built EXE.  There are several other techniques that make it appear as if you are making new controls, none of which are very easy to implement and have other limitations.
Even so, the application you want sounds complicated and I think you need to get a good list of requirements before you start.  It does not sound like a simple application and would take plent of time for debug and support.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Similar Messages

  • Is it possible to create controls dynamically.

    Hai,
    Is it possible to create control or arrays dynamically in LabVIEW.That means i want to create controls at run time depending on the dynamic data.
    Please help me in this regard.

    Ben wrote:
    Christian's "Create Controls on the Fly"
    Just for reference, Here's the original fly post. Makes it easier to find my old stuff.
    (Of course there could be other interpretations of "on the fly": The 1971 album cover of "Sticky Fingers" but the Rolling stones comes to mind. )
    LabVIEW Champion . Do more with less code and in less time .

  • Create controls dynamically based on XML file

    Hi All,
    I am very new to Flex environment. I am trying to integrate FLEX with ASP.net for better UI interfacing.
    May I know if is it possible to draw fields (Text boxes, option buttons, etc) on the Flex dynamically using a XML file at runtime.
    What my expectation is, if I have an XML file with the filed names and type, can the Flex draw them on the front end UI?
    Please  let me know your thoughts.
    Naveen

    Is there possible to have an portlet that can be enlarged?Yes. You can maximise a portlet
    And is there possible if I have a .php file, and then I want to create a portlet based on that .php fileNot directly.
    If you are going to run the PHP file in its own machine then you could use a browser or clipper portlet. If you want to run the PHP file on the JVM itself, I believe there are some commercial products that let you do this (then its equivalent to a JavaServlet). This could then be included by any dummy JSP and you could use a plain jsp portlet . however you wqould have to be careful how you generate links within the PHP file (because you'd have to mimic the way BEA tags behave) .
    never tried this and if you have few PHP pages then you could probably rewrite to java.

  • How to generate controls dynamically based on value stored in database using mvc4?

    In my database, i have a field called control_ids corresponding to  text box, dropdownlist, radiobuttonlist etc. My goal is to
    create controls dynamically based on value of control_id-field in table. Anybody please help me how to create the controls dynamically in MVC 4 for this scenario.

    In your view you could do something like that:
    foreach (var field in Model.FormStruture.fields)
    <div class="editor-label">
    <label for="@field.Name">@field.Descricao</label>
    </div>
    <div class="editor-field">
    <input class="text-box single-line" id="@field.Name" name="@field.Name" type="text" value="@field.Valor" data-rules-required="@field.Mandatory.ToString().ToLower()" data-rule-number="@field.Tipo.Equals(SiB.OCR.Documentos.Modelo.TipofieldDocumento.Numerico).ToString().ToLower()" title="@field.Descricao" />
    </div>
    if (!String.IsNullOrEmpty(field.Format))
    @:<script type="text/javascript">$("[email protected]").mask("@field.Format");</script>

  • How to create control dynamicall​y while front panel fly using Xcontrol or anyothere options but without scripting tools

    Hello friends
               I have one doubt How to create control dynamically while front panel fly using Xcontrol or anyothere options but without scripting tools.I need to create the controls while vi is running.For example I need to create one Boolean  while VI was Fly and i need one Examples it is easy to understand.
    Jayavel

    You must be using a different dictionary than the rest of us.
    You can't dynamically create controls while a VI is running.   (If I'm mistaken, then I'm sure someone else can jump in and say how it can be done.)
    Do you have a finite number of controls you could possibly need?  What you can do is create enough controls of the type you need ahead of time.  At the beginning of your program, you hide all of those controls.  As you need to create a control, you make it visible using property nodes.  There are numerous properties you can set at run time suce as ranges, colors, captions, ...  Of course you can't wire these controls to any other bits of code ahead of time since at that time, you haven't defined what you want each one to actually control.  But if you use an event structure to detect when the values of the controls have changed, you can then programmatically pass the data off to other parts of your code using queues.  The architecture can get complicate quite fast, so you may want to look through Ben's Action Engine Nugget and other related threads for how to create mechanisms for using these controls.  Perhaps storing queue reference numbers or assign user events to each one.

  • I create a CNiGraph control dynamically, But why havent I seen the Demo Mode Message Window?

    I am a licenced user of Mesurement Studio. I create a CNiGraph control dynamically. All work well.
    Then I copied my source code to another PC, I run "regsvr32 cwui.ocx", I found I can compile my source code on that computer, without any message box.
    But some people said that there will be a Demo Mode Message box.
    That's to say, any one can copy my source code to other computer and compile it well, then how can I protect my right?
    On what condition the Demo Mode Message Box will appear? I want it to show up when others use my code.

    It sounds like you were expecting the message box to come up at compile-time. Is that correct? If so, that is not expected and should not ever happen - the message box that you're referring to should not come up until you actually run the application. However, if you're dynamically creating the control and you are specifying the license string at creation time in your code, I expect it would still work when you take the code to another machine. Could you please reply with more information about what you're trying to do and how you expect this to work? Thanks.
    - Elton

  • Bringing dynamically created controls into scope

    Normally I can bring controls into scope in a function with
    the line
    var myControl = myControl;
    where myControl is the name of the control.
    If I dynamically create controls (called say cbx1, cbx7 etc.
    where the
    numbers are all different, but not necessarily contiguous)
    and save
    their names in myArray, then myArray[0] will contain the name
    of one of
    my new controls.
    How can I bring this control into scope in my function?
    And is there a way to create, read and change variable
    variables in
    ActionScript?
    Doug

    create an array within your function that's local to your
    function, if that's what you want. what's the purpose,
    though?

  • AutoScrolling of PanelLayout and setting Location of dynamically created controls

    Hi, I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up.
    So basically I have wrote a code that lets me drag on control over other other and replace their's locations.
    So I wanted to add possibility for user to dynamically add new controls (every new control is suppose to be 200px below previous) - everything is fine as long as I add them from upper section of my LayoutPanel (without scrolling) but when I try to add
    them while I'm half dawn scrolled they are placed based on CURRENT left upper corner which is NOT a upper left corner of LayoutPanel therfore they are placed with wrong padding based on current scrolled position.
    So my question is how can I avoid it and always add new controls based on LayoutPanel upper left corner? (I have already tried disabling AutoScroll while adding new control and enabling it back after adding - it works but I want to find PROPER way because
    I'm sure there must be some kind of solution to it)
    Thanks in advance.

    Hi darekg11,
    >> I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up
    I am wondering what the PanelLayout was, was it a “flowLayoutPanel” or “tableLayoutPanel”?
    >> basically I have wrote a code that lets me drag on control over other other and replace their's locations
    Did you mean you drag the control at runtime or at design time?
    >> how can I avoid it and always add new controls based on LayoutPanel upper left corner
    I could not reproduce your issue, and could you share us some key code or a simple demo to reproduce your issue?
    I made a research about “scrolling panel”, and I think the link below might be useful to you:
    # Scrolling Panel
    http://www.codeproject.com/Articles/226381/Scrolling-Panel
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Creating a dynamic event from a control reference

    Does anyone have an example of creating a dynamically driven  event from a control reference?

    Hi 4BoysDad,
    There is a good example that can achieve what you're looking for in the example finder.  It is called "Dynamically Register For Events.vi".  It will be under
    <labview>\examples\general\dynamicevents.llb\Dynamically Register for Events.vi
    Regards,
    Che T.
    Applications Engineer
    National Instruments

  • Creating a dynamic sqlldr control file

    Hi,
    I am in need of creating a dynamic sqlldr control file that will check the flat file, delimiter and load the data in a table. The table is having all the columns but the flat file can vary time to time.
    looking forward for your valuable suggestions.
    Regards
    Rajib.

    You may want to post more explicit requirements if you want sample code. For example, what the file looks like, what variations are allowed, what variations are disallowed, an example control file that would be output, etc. Specifying the precise language you're using (there are many different shell scripting languages) would also help.
    In my experience, though, this sort of thing is almost always a one-off-- examples don't tend to be particularly helpful because every set of requirements tends to be very particular. If you have a full understanding of the requirements, and a decent understanding of your scripting language, I doubt it would take more than half a day to knock something together.
    Justin

  • Creating a Dynamic Node for a Dynamic Graphic - Tutorial

    Hi everyone,
    I'm sharing my first tutorial, hope it'll be helpful for you.
    In the Layout tab, it's possible to create an UI element "Business Graphic". It's a very simple tool that only requires a context node with a category attribute (that means, the values that will appear in the 'x' axis) and one or more series (each one with a color, generally a numerical value). It's possible to add a label for each series for better understanding of the Graphic.
    Although it's a very powerful tool, there are some problems when we must create a graphic with N series and different labels. If the graphic use an ALV or internal table to fetch data, during runtime we can have more or less series. The definition of a static node and generic series is not enough in this case. That's why I'd like to present you this little tutorial to create a dynamic node that fetchs a dynamic graph:
    In the WDDOINIT or Event Handler method that starts the application (once the data is available) we should create the dynamic node in the following way:
      DATA: lr_node_info    TYPE REF TO if_wd_context_node_info,             
                 lt_attributes      TYPE cl_abap_structdescr=>component_table,
                 attribute           LIKE LINE OF lt_attributes,
                 struct_type       TYPE REF TO cl_abap_structdescr,
                 lo_dyn_node    TYPE REF TO if_wd_context_node.
    * Let's suppouse we can LOOP at the data table, so we can fetch the
    * category data type (for example company name, month, year, ...)
    * and each series with a numeric type
      attribute-name = 'CATEGORY'.
      attribute-type ?= cl_abap_datadescr=>describe_by_name( 'STRING' ).
      INSERT attribute INTO TABLE lt_attributes.
      attribute-name = 'SERIE1'.
      attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
      INSERT attribute INTO TABLE lt_attributes.
      attribute-name = 'SERIE2'.
      attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
      INSERT attribute INTO TABLE lt_attributes.
    * Once we have all the attributs for the node, we create a formal structure
      struct_type = cl_abap_structdescr=>create( lt_attributes ).
    * Now we can get the context information to add a new node
      lr_node_info = wd_context->get_node_info( ).
    * Create the node
      lr_node_info = lr_node_info->add_new_child_node(
                        name = 'GRPH_DYN'
                        IS_MANDATORY = ABAP_false
                        IS_MULTIPLE = ABAP_true
                        STATIC_ELEMENT_RTTI = struct_type
                        IS_STATIC = ABAP_false ).
    * Now we should populates the node, I'll create a hardcoded table,
    * simulating the internal table that you should already have
      TYPES: BEGIN OF tw_alv,
                        category  TYPE string,
                       SERIE1    TYPE i,
                       SERIE2    TYPE i,
                    END OF tw_alv.
      TYPES: tt_alv TYPE STANDARD TABLE OF tw_alv.
      DATA: lw_alv  TYPE tw_alv,
                  lt_alv   TYPE tt_alv.
      lw_alv-category = 'Alfa'.
      lw_alv-serie1   = 3.
      lw_alv-serie2   = 8.
      APPEND lw_alv TO lt_alv.
      lw_alv-category = 'Beta'.
      lw_alv-serie1   = 4.
      lw_alv-serie2   = 4.
      APPEND lw_alv TO lt_alv.
      lw_alv-category = 'Gamma'.
      lw_alv-serie1   = 1.
      lw_alv-serie2   = 3.
      APPEND lw_alv TO lt_alv.
    * Now let's call the recently created node and bind the lt_alv table.
    * Get node from context
      lo_dyn_node = wd_context->get_child_node( name = 'GRPH_DYN' ).
    * Bind table with ALV Container
      CALL METHOD lo_dyn_node->bind_table
        EXPORTING
          new_items = lt_alv.
    * It's always good to check if the table was succesfully binded.
    * I refresh the lt_alv table and get the values from the node for controlling
      REFRESH lt_alv.
      lo_dyn_node->get_static_attributes_table( IMPORTING table = lt_alv ).
    There are other ways of adding a node structure in the method add_new_child_node, but it works for me only with STATIC_ELEMENT_RTTI. The node is now created and has the data required for the graphic. Now, we should go to WDDOONMODIFYVIEW, or save the target view as a parameter, to create the graphic, bind the category and series and show it on the screen.
      DATA: lr_graph       TYPE REF TO cl_wd_business_graphics,
                  lr_cat           TYPE REF TO cl_wd_category,
                  lr_series1    TYPE REF TO cl_wd_simple_series,
                  lr_series2    TYPE REF TO cl_wd_simple_series,
                  lr_container TYPE REF TO cl_wd_uielement_container,
                  lr_flow         TYPE REF TO cl_wd_flow_data.
    * Get the root element from the Layout or the specific
    * container you have created for the graphic
      lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    * Creates a line busniess graph
      lr_graph = cl_wd_business_graphics=>new_business_graphics(
            BIND_SERIES_SOURCE = 'GRPH_DYN'
            CHART_TYPE = cl_wd_business_graphics=>e_chart_type-lines
            HEIGHT = 340
            WIDTH = 750
            ID = 'GRAPH'  ).
    * Create the flow data for the new UI Element business graphic
      lr_flow = cl_wd_flow_data=>new_flow_data( element = lr_graph ).
    * Set graph in the root container from the Layout tab
      lr_container->add_child( lr_graph ).
    * Bind the category from the dynamic node to the dynamic graphic
      lr_cat = cl_wd_category=>new_category(
                      view = view
                      bind_description = 'GRPH_DYN.CATEGORY'
                      tooltip = 'Company Name' ).
      lr_graph->set_category( lr_cat ).
    * Bind the two series from the dynamic node to the dynamic graphic
      lr_series1 = cl_wd_simple_series=>new_simple_series(
                      bind_value = 'GRPH_DYN.SERIE1'
                      label = 'Sales'
                      view = view
                      tooltip = 'Average Sales' ).
      lr_graph->add_series( lr_series1 ).
      lr_series2 = cl_wd_simple_series=>new_simple_series(
                      bind_value = 'GRPH_DYN.SERIE2'
                      label = 'Purchases'
                      view = view
                      tooltip = 'Average Purchases' ).
      lr_graph->add_series( lr_series2 ).
    Finally we have created our business graphic. Test the application and you'll see something like the attached image.
    Hope you'll find it useful.
    Daniel Monteros.

    Hi,
    http://htmldb.oracle.com/pls/otn/f?p=26372
    then ApEx>Trees and pick a level.
    Use Help for more information.
    I you think that tree could help I will put more explanation into help page.
    Konstantin

  • How to create a dynamic textarea in AS2

    I am trying to create a dynamic textArea in AS2.  Here is what I have so far:
    import mx.controls.TextArea;
    var myTextArea:TextArea = new TextArea();
    myTextArea.setSize(320, 240);
    myTextArea.move(10, 10);
    addChild(myTextArea);
    I have the textarea component in my libray, but nothing shows up onscreen.
    Help

    Are you sure you want AS2.0? There is no addChild() in AS2.0.
    In AS2.0, make sure you have the TextArea component in your library, importing it isn't good enough.
    An easy way to instantiate a component, say a button, is like so (modify for TextArea or any other component):
    import mx.controls.Button;
    var myButton = createClassObject(Button,"button2",5,{label:"Test Button"});
    usage:
    createClassObject(className, instanceName, depth, initObject)

  • Help me to achieve my goal: creating a dynamic CQ5 website from a CRX Imported Site

    Hello everyone.
    For two weeks now, i'm trying to create a dynamic content CQ5 website from an imported CRX site.
    What I already did and where I am now:
    Step 1 - I have imported a website using the CRX Import Site tool.
    Step 2 - I have done some mappings in my imported site images and texts. In the CRX content repository estructure, I can found the mappings as
    unstructured nodes, at "etc/designs/mysite/dev/mappings", the component properties matching the components I selected in the component extractor;
    Step 3 - I have done some extractions in my imported site images and texts. In the CRX content repository estructure, I can found the extracted components
    at "apps/mysite/resources/images" (the last two ones I created myself);
    Step 4 - After done all these steps, I acessed the Web Sites CQ5 menu and selected the "New Site" option, in the "New..." button. A "MySite Blueprint" is avaliable
    to be selected as a Blue Print to my new site, but If I select this one and create my new site, not all the mapped components can be manipulated or selected and some
    mappings just show on as an empty selection box in the page, where I am able to insert images, for exemple.
    In short, after all these steps, I still can't do what I want with my mapped components and the new site is, basically, the same as the imported. Not every mapped components can be selected and edited and I can't change my site template or content (the far I got here is add a new image in the site, but without the liberty to change the position).
    So, what I'm forgetting? Is there some step that I don't getting through? Maybe I need to work on the template created by the site importer?
    Is there some material or media that can help me or maybe add knowledge to me?
    Already read the "Site importer" and "Components" in Adobe CQ5 Documentation but don't get me far from where I am now.
    If someone can help me to make this process better, with more liberty on my new site and the possibility to control all the components, adding new ones
    or editing the existent ones, I'll be very gratefull and with a great new knowledge.
    Operational System: Windows Server 2008
    CQ Version: CQ 5.4.0.20110218
    Thanks.

    I want to do this using the site importer because I want to show my clients how we can make content management and experience customizations a lot easier starting by their own websites.
    So, importing my customer website and transforming it in a new CQ website is the way to show this.
    Anyway, thanks in advance and I'm going to look at the page component for the website that I imported.
    If someone got another tip or hint, I'll be very thankfull.

  • Create a dynamic hyperlink in a picture.

    Hello forum,
    Can someone help me create a dynamic hyperlink in a picture? Essentially what I have is a drop down box with a list of games. On the same sheet, I have a picture with the Wikipedia icon. What I would like to do is select the game from from the drop
    down list and be able to click on the Wikipedia picture on the sheet and have my browser open to the Wikipedia page of the game. 
    Hopefully I've explained this pretty clearly. Thanks in advance for any help. 

    Hi,
    According to your description, my understanding is that you have a drop down box control and one Wikipedia icon picture in Excel
    sheet. And you add the hyperlinks which related to the game behind the picture. If you choose the game name from the drop down box, the Wikipedia icon picture will not change but the hyperlink will change to game introduction and we can click the Wikipedia
    picture to open the Wikipedia page in browser.
    If it is, your required might use VBA coding/programing. Please post your question to MSDN forum to get more help.
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • Create Control - Modern vs Classic

    I am using Dynamic Generation Hardware Start Trigger.vi as a template (although my question could apply to any examples vi).
    My question is aesthetic in nature.
    * The Controls have a white background with black text.
    * When I perform "Create Control" on the terminal using the example provided by LV, it does create a white bg w/ blk text.  Great!
    * When I try to create my own program and perform "Create Control" on same VI, I get control with BROWN bg w/ blk text (probably Classic group)
    So the question is how do I change my setup to access my desired set of Controls/Indicators/etc from the correct group Modern/Classic/etc?
    Thanks.

    Hi Bret12,
    I presume that you want to have either modern or silver controls or indicators as your default control or indicator? Perhaps this link may be of your assistance: http://digital.ni.com/public.nsf/allkb/9B3AF1A89123340A86257A09004C9DBF
    Open your LabVIEW >> Tools >> Options >> Front Panel  >> Change your default control to be classic, modern or silver.
    Hope that helps
    Warmest regards,
    Lennard.C 
    Learning new things everyday...

Maybe you are looking for

  • Photoshop Refine Edge Tool questions

    I made a Quick Selection of a person and am using the Refine Edge tool with the goal of extracting the person from the image so I can place her somewhere else. I set the Smart Radius box, and Radius to about 2, smoothness to about 9, and then I take

  • Storing binary data to a file......

    Hi Friends, I am trying to make a webapp in which users can upload Videos and I can store that videos on the server. I have this bit of code:     public ActionForward execute(             ActionMapping mapping,             ActionForm form,           

  • SOFFPHIO and GOS attachment

    Hi all Users are using the Generic Object Services to attach the PC document, the documents are normally stored in the database (SOFFCONT1). So to store externally the documents using kpro, i assign the SOFFPHIO document class to SOFFHTTP using TCode

  • Back from service, case doesn't seem right

    I just got my macbook pro back from service, maybe a week or two ago. Since its been back I've noticed the case really doesn't seem like its fitting together right. I've got gaps between various pieces of the case and have parts that don't really fit

  • Advantages of RMAN Catalog

    Hi, In RMAN what are the major advantages of using a catalog ? Also whether catalog is required for a single database instance. Thanks in advance.