Creating a type defined control refnum cluster?

Hello -
Is it possible to create control refnums for front panel objects and make a type defined cluster out of them?  I don't seem to be having any luck, but I could swear I've seen it done before.
I am trying to pass a cluster of control references into sub-vis that will be called dynamically (using call by reference).  I want to create a standard cluster for use in all of the sub-vi's without having to go back and edit the cluster in every VI if anything is changed or added.
If not, is there a better way?
Thanks,
Mike
Solved!
Go to Solution.

Once I created that type def (look at my Mini Nugget to see how I did that) the type def was used as shown below to update control from a sub-VI.
I had an app with hundereds of controls and indicators that needed updated.
So I bundled refes for all of the control into logical groups.
Then passed these refs to the sub-VI
And the sub-VI used those named refs to do the updates.
I hope that help,
Ben
Message Edited by Ben on 03-25-2009 10:41 AM
Message Edited by Ben on 03-25-2009 10:43 AM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Attachments:
FP.PNG ‏88 KB
Bundle_refs.PNG ‏92 KB
Pass_to_SubVI.PNG ‏82 KB

Similar Messages

  • Creating a user defined control in java using java Beans

    Hi,
    I want to create a user defined control for drawing a line like a line control which is used in Visual Basic. I have created a program which will be drawing a line in runtime..but i cant use the same program in the beans to act as a user defined control to work as a line control ..b'coz i extend the class with JPanel..so when i drag and drop the control i am getting the panel only...so can u give me some ideas to create the line control...i am attaching the code which i created ...so pls do make some modification or correction to work as a line control....
    Thank u in advance..........
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Line extends JPanel
    BufferedImage image;
    Color color;
    Stroke stroke;
    Point start = new Point();
    Point end = new Point();
    public Line()
    color = Color.blue;
    stroke = new BasicStroke(1f, BasicStroke.CAP_BUTT,
    BasicStroke.JOIN_MITER);
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    if(image == null)
    initImage();
    g.drawImage(image, 0, 0, this);
    // Draw temp line over image.
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(Color.red);
    g2.drawLine(start.x, start.y, end.x, end.y);
    public void setTempPoints(Point p1, Point p2) {
    start = p1;
    end = p2;
    repaint();
    public void draw(Point p1, Point p2)
    Graphics2D g2 = image.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(color);
    g2.setStroke(stroke);
    g2.drawLine(p1.x, p1.y, p2.x, p2.y);
    g2.dispose();
    start = end;
    repaint();
    private void clearImage()
    Graphics g = image.getGraphics();
    g.setColor(getBackground());
    g.fillRect(0, 0, image.getWidth(), image.getHeight());
    g.dispose();
    repaint();
    private void initImage()
    int w = getWidth();
    int h = getHeight();
    image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    g2.setPaint(getBackground());
    g2.fillRect(0,0,w,h);
    g2.dispose();
    public static void main(String[] args)
    Line wbclient = new Line();
    DrawingListener listener = new DrawingListener(wbclient);
    wbclient.addMouseListener(listener);
    wbclient.addMouseMotionListener(listener);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(wbclient);
    f.setSize(400,400);
    f.setLocation(200,200);
    f.setVisible(true);
    class DrawingListener extends MouseInputAdapter
    Line wbclient;
    Point start;
    Point end;
    final int MIN_DIST = 5;
    public DrawingListener(Line fh)
    this.wbclient = fh;
    public void mousePressed(MouseEvent e)
    start = e.getPoint();
    public void mouseReleased(MouseEvent e)
    end=e.getPoint();
    if(start.distance(end) > MIN_DIST)
    wbclient.draw(start, end);
    public void mouseDragged(MouseEvent e)
    wbclient.setTempPoints(start, e.getPoint());
    }

    %TYPE is PL/SQL syntax, which thus cannot be used inside SQL.
    The other way around, SQL can be used inside PL/SQL.
    Regards,
    K.

  • Creating a user defined control using java Beans

    Hi,
    I want to create a user defined control which is used to draw a line ...
    same as we using in VB as Line control.In java we will create the component using using Beans . I created a code
    which will draw a line in the run time .For tat i extend the class with JPanel,but i cant use the same program in beans....b'coz it simply draws the jpanel when we drag and drop that control in the form....
    so can u give me some ideas to create a control which is used to draw a line .....i am attaching the same which i did .....
    thank u in advance...
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Line extends JPanel
    BufferedImage image;
    Color color;
    Stroke stroke;
    Point start = new Point();
    Point end = new Point();
    public Line()
    color = Color.blue;
    stroke = new BasicStroke(1f, BasicStroke.CAP_BUTT,
    BasicStroke.JOIN_MITER);
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    if(image == null)
    initImage();
    g.drawImage(image, 0, 0, this);
    // Draw temp line over image.
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(Color.red);
    g2.drawLine(start.x, start.y, end.x, end.y);
    public void setTempPoints(Point p1, Point p2) {
    start = p1;
    end = p2;
    repaint();
    public void draw(Point p1, Point p2)
    Graphics2D g2 = image.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(color);
    g2.setStroke(stroke);
    g2.drawLine(p1.x, p1.y, p2.x, p2.y);
    g2.dispose();
    start = end;
    repaint();
    private void clearImage()
    Graphics g = image.getGraphics();
    g.setColor(getBackground());
    g.fillRect(0, 0, image.getWidth(), image.getHeight());
    g.dispose();
    repaint();
    private void initImage()
    int w = getWidth();
    int h = getHeight();
    image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    g2.setPaint(getBackground());
    g2.fillRect(0,0,w,h);
    g2.dispose();
    public static void main(String[] args)
    Line wbclient = new Line();
    DrawingListener listener = new DrawingListener(wbclient);
    wbclient.addMouseListener(listener);
    wbclient.addMouseMotionListener(listener);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(wbclient);
    f.setSize(400,400);
    f.setLocation(200,200);
    f.setVisible(true);
    class DrawingListener extends MouseInputAdapter
    Line wbclient;
    Point start;
    Point end;
    final int MIN_DIST = 5;
    public DrawingListener(Line fh)
    this.wbclient = fh;
    public void mousePressed(MouseEvent e)
    start = e.getPoint();
    public void mouseReleased(MouseEvent e)
    end=e.getPoint();
    if(start.distance(end) > MIN_DIST)
    wbclient.draw(start, end);
    public void mouseDragged(MouseEvent e)
    wbclient.setTempPoints(start, e.getPoint());
    }

    Hi Ravi,
    How about something like this:
    IUserMaint user = UMFactory.getUserFactory().newUser("myNewUser");
    user.setFirstName("1st Name");
    user.setLastName("2nd Name");
    user.setEmail("[email protected]");
    user.save();
    user.commit();
    IUserAccount uacc = UMFactory.getUserAccountFactory().newUserAccount("myNewUser", user.getUniqueID());
    uacc.setPassword("initial");
    uacc.setPasswordChangeRequired(false);
    uacc.save();
    uacc.commit();
    Hope this helps.
    Daniel

  • How to programatically determine type of controls in a cluster

    Hello All,
    This is my second post. Am using LabVIEW 8.6.
    Am developing software to automate test system and also generate a professional report. My approach here is to make the report very much auto configured as per GUI design (in short changes in GUI programatically gets reflected in Report format), so as to have easy configurability.
    To achieve this I should be programmatically be able to determine the type of control each cluster has and act accordingly. A cluster may have a set of controls and as well another cluster. This way I can put in a for loop and need not worry about any increment or decrement of element in the cluster!
    I have access to “Controls[]” in property node of the cluster, but am unable to find a way to determine which type of control it is – Boolean (True/False), Text, Ring, Combolist, etc. If I get hold of this then I can put them in a for loop and take action on all controls present in the cluster depending on the type of control - Not all, there will be a default to take care of non-utilised controls and shall update as required!
    Am just guessing - will variant be a solution to this or am wrong?
    Also will it be possible to remove border visibility of a cluster in front panel, so I can have a structured program without getting reflected in front panel?
    Hope to get a response.
    Thanks and Regards,
    Tirthankar De
    Solved!
    Go to Solution.

    If you want to use the Controls[] property have a look at the 'Class' value of each reference:
    To remove the border of (any) modern control, right click the border, select the brush tool, select the Transparant value (upper right corner), if you still see a little border hit 'Space' to select front and background color.
    To see what can be done with the variant data from a control have a look at this custom probe. Where I use OpenG tools to get all the possible info on the data.
    Ton
    Message Edited by TonP on 12-11-2008 09:38 PM
    Message Edited by TonP on 12-11-2008 09:39 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    GetClusterContent.png ‏12 KB

  • Type defined array of clusters for holding configuration data - setting default values for each array element

    Hi,
    I was wondering if I could get some information and opinions about using a type defined array of clusters to hold configuration data.  I am creating a program to test multiple DUTs and wanted to have a type defined control for each DUT containing the information needed to create the DAQmx tasks for all of the signals for that DUT.  I am wanting to do this so that the data is hard-coded and not in a file that the user could mess up.
    The type def controls are then put in a subVI that chooses the appropriate one based on the DUT Type enumeration wired to a case structure.  
    I am having problems with the type defined control.  I am seeing issues when attempting to save a unique configuration to each array element in the array of clusters.  Somehow it worked to begin with, but now clicking "Data Operations --> Make Current value default" on individual elements of the cluster or the entire cluster (array element) is not saving the data when I re-open the type def control.  What am I doing wrong?  Am I trying to do something with arrays of clusters that I should not be doing?
    I have attached one of the type defined controls for reference.  I tried changing it to Strict to see if that helped, but no luck.
    To reproduce, change the resource string for array element 0 and make the new value the default value.  Then close the type def, and re-open it.  The old value is still present in that element.  The VI is saved in LabVIEW 2012.
    Solved!
    Go to Solution.
    Attachments:
    CM_AnalogInputs.ctl ‏11 KB

    Values of a typedef are not proprigated to instances of the control. THey will pick it up if created AFTER the data values have been changed. THey will not get updated with future changes. You should either create a VI specifically for hardcoding your values or implement a file based initialization. The file based would be much better and more flexible. If you don't want users to modify the data simply encrypt it. There is a noce blowfish library you can download.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Using control refnums in srtict typedef cluster

    I'm having a small problem using control refnums. I've not used them much so this could just be me doing something wrong!
    I'm building an application with a GUI which will need updating with data from within various subVIs and a couple of parallel loops. So, what I wanted to do was "build" a strict typedef cluster of references to the front panel objects I want to update, then I can pass this cluster to any subvi or structure which may need to update a FP object. So far so good...
    The problem:
    On my main GUI I have a strict typedef'd tab control, which I want to be able to reference. When I build my cluster of refnum's I duly create one for this typedef'd tab control. The problem is, if I modify the tab control in anyway, the cluster of refnum's breaks.
    Anyone tell me why this is happening?
    I've attached an example VI I created which shows the problem. Basically, open the typedef to the tab control and change anything, you'll see the cluster of refnums break... you can see a video of it here:  Video
    Any thoughts would be gratefully appreciated!
    Thanks
    Paul
    Attachments:
    refnums.zip ‏15 KB

    Hai,
    Just went through the post
    The strict typd controls automatically gets updated when the parent control changes.  But the refnums that are created out of the strictly typed controls needs manual updation coz there is no linkage between refnum that was created and the strict type control.
    You just create a strict type refnum that carries the properties of a strict type control and in no way a linkage exists between these two.  Hopefully if there is an option to link the refnum and control with "Update from typedef" will solve the problems
    With regards,
    JK
    (Certified LabVIEW Developer)
    Give Kudos for Good Answers, and Mark it a solution if your problem is solved.

  • Error creating a user defined report in the grid control

    I am trying to create a simple User Defined report in the Grid OEM
    Under the 'Elements' tab I have a 'Type' - 'Database Table from SQL'
    And I have this 'Statement' - SELECT * FROM SYS.DBA_USERS
    When I Click the 'Preview' button I get this error.
    Error rendering element. Exception: ORA-00942: table or view does not exist
    I'm logged on as SYSTEM.
    Isn't the SYS.DBA_USERS table accessible by SYSTEM?
    Any advice on what I'm doing wrong/
    Edited by: bfee_sdc on Oct 19, 2010 9:12 AM

    What are the tricks?
    It has to be some what supported since I found this somewhere in an Oracle note...
    How to create custom reports on tables other than mgmt* views.
    To create reports on other tables, grant permissions to MGMT_VIEW user as MGMT_VIEW is responsible for creating reports in grid control
    SQL> GRANT SELECT on SYSMAN.<table_name> to MGMT_VIEW;
    And then create the reports in the reporting framework referencing SYSMAN.<table_name> in the query.
    I tried GRANT SELECT on SYS.DBA_USERS to MGNT_VIEW but this did not work.

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • LabVIEW 8.2 control refnum type descriptor missing

    In LabVIEW 7.1, the control refnum had a type descriptor property, I do not see it in LabVIEW 8.2.1?  How do you get the type descriptor from a control refnum in LabVIEW 8.2.1?
    Respectfully,
    Robert

    Matthew Kelton wrote:
    The problem I have is that I have a generic control reference, so I don't know the type.  That is why I was using the descriptor to determine the type to properly use variant to data on the Value Property.  As it stands now, 8.5 still supports the Type Descriptor if it exists in VI I upgrade, but how long before it disappears?  I use this in a generic VI that is used in every project I do, saving me hours per project.
    The least NI could have done was just name is TypeDescr16 and TypeDescr32 or something.
    TypeDescr32 is NOT exposed and on purpose too so there can't be such a property. And yes there is a chance that the old TypeDesc property disappears at some point. However it won't be tomorrow. The 4.x compatibility mode for the Typecast function (necessary for the boolean size change from 4.x to 5.x) is still there but for the Flatten/Unflatten it had to make place for the 7.x compatibility flag. And it might disappear with LabVIEW 9.x since as I have found out today, LabVIEW 8.5 is the first version that refuses to load 4.x VIs directly.
    So the TypeDesc property will probably work until around LabVIEW 12.x when it will cease to support loading LabVIEW 7.x VIs. (Note, this prediction is just a very wild guess and should be taken with a big grain of salt).
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Creating a User Defined Type in SQLDeveloper

    SQLDeveloper Version 1.2.1.3213-no-jre
    Platform: Microsoft Windows XP Professional Version 2002 SP2
    Java: jdk-1.5.0_12
    I'm new to PL/SQL and so what I'm trying to do may not be possible. I've checked loads of examples online but cannot find a precise example of what I am trying to do.
    I'm trying to create a type as follows:
    create or replace
    TYPE t_favourite_obj AS OBJECT
    ( favourite_id user_favourites.FAVOURITE_ID%TYPE
    , msisdn VARCHAR(20)
    , url VARCHAR(512)
    , title VARCHAR(512)
    , hit_count NUMBER(10,0)
    , time_stamp TIMESTAMP(6)
    However, I get the following error:
    Error(3,18): PLS-00201: identifier 'USER_FAVOURITES.FAVOURITE_ID' must be declared
    I've got a USER_FAVOURITES table within scope and I've had no problems referencing 'USER_FAVOURITES.FAVOURITE_ID' in procedures and functions.
    However, whenever I type user_favourites. (note the period) in the editor a list of columns for the table is displayed indicating that the table is in scope. I then select from the list, append %TYPE and then try to compile but without success.
    I simply cannot reference a table column as a datatype when defining a user type. Is this an SQLDeveloper bug or is it a PL/SQL characteristic?
    Cheers

    %TYPE is PL/SQL syntax, which thus cannot be used inside SQL.
    The other way around, SQL can be used inside PL/SQL.
    Regards,
    K.

  • Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'

    Dear experts,
    I set up the document distribution (SWU3, backgroundjob SMTP, activated the workflows, flagged the linkages, etc). Now, I have still a error:
    Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'
    Does anyone know what the cause of exception 1250 could be?
    Thanks in advance and kind regards,
    Samuel

    hi,
    SAP ITS is SAP Internet Transaction Server which provides connection between SAP ERP system and html client.
    Check with bassis, i think TCP/IP or work station application not configured yet. i guess?
    Benakaraja
    ??P

  • How to create a user defined type base on existing table

    Hi Everyone,
    Are there any way to create a user defined type base on existing table us as :
    CREATE OR REPLACE Type MyTable Is Table Of PART%ROWTYPE;
    where Part is a table.
    Regards,
    JDang

    Hi JDAng,
    Can't be done. %ROWTYPE is a PL/SQL construct, and as such cannot be used in SQL.
    Regards
    Peter

  • Can not create mapping fro message type defined in a folder in PI

    Hello
    in PI 7.1, there is feature to created folder which is very good to organize you objects in the way you like. In ESR, I can create a new folder, and then create data type and  message type within the folder, however when I try to create a message mapping, I can NOT use message types created in any folders, only the message types created in the SAP pre-defined node Message Types can be used for message mapping. Is it a bug? if yes, in which SP will it be fixed? is there any go-around for this issue by now? I am using PI 7.1 SP5.
    Thanks
    Eric

    Hi Eric,
    It is not the flaw.
    You have two options :
    1) You can directly drag the Message Type into Message Mapping Source and Target Message area
    2) Select the Signature Tab -->Create the New Entry of Message Type and Select from the Search Result
    regards
    Gangaprasad

  • How do I apply properties to a control refnum from another VI and whose type I know?

    Hi,
    I have programmatically retrieved the Control refnum of a Table running on a separate VI. I search for its name and when match ocurrs I would like to use its control refnum to change som cell values in it by either the Invoke node or Property node. Nevertheless even though I know it is a Table I am not allowed to wire the control refnum to a property node with "Active cell", "BG color" et.c. I am not either allowed to wire it to an Invoke node with the method "Set Cell Value".
    Is there a work around for this?
    Solved!
    Go to Solution.

    Well, i assume that Santhosh solution works too (i hope he tested it before ). So no mistake here. Still, if you like, you can take the "solution" flag back from a post and redistribute it....
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Create a Fancy Custom Control

    I'm trying to create a fancy Custom Control for processing Cell Counter images.  I want a Control that lets me select two image types, Fluorescent or DAB, and if I choose Fluorescent, will let me pick Red, Green, or Blue.
    I created two Radio Button controls, one for Fluorescent/DAB, one for RGB, that look like this:
    I was hoping to "embed" the RGB control inside the Image Type control, yet have them retain their properties (a 2-element and 3-element Dialog Box).  When I did the simple drag-and-drop of RGB onto Image Type, it acted as though I added elements to a cluster, and I had a 5-element Dialog Box, not what I wanted.
    So I got clever and dragged Image Type on top of RGB.  Of course, if Image Type is in front, you don't see RGB.  However, if RGB is in front, you see both, but with ugly shadows around RGB (I made its label invisible).
    Anyone have an idea how I can Have my Cake and Eat It, Too?  Specifically, how can I get rid of the shadow that the RGB control casts on the Image Type control?
    Here are the controls, themselves, as snippets:
    Bob Schor
    Solved!
    Go to Solution.

    Duh ...  Thanks, Lynn!  Here is the result:
    Bob Schor

Maybe you are looking for