Jump to content

How to creat an UI for drawing interactive flow control charts


olisting

Recommended Posts

Hi all,

 

instead of an script based flow control programming UI for our user, where they type text to control the measurment instrument.

We want to program an graphical UI where they can add new commands per drag'n'drop from a Picture Ring to a surface.

Similar to a flow chart tool (e.g.: yED Graph Editor), or to the UML Modeller from Symbio (Picture).

 

But we are not sure how to solve this...

  • Draw it on an big picture control:
    Then we have more work find the right object if the user double click it to configure it.
    We have more work drawing the flow arrows especially if the user move something.
  • Draw it via scripting on a frontpanel and reload it in a subpanel:
    Then it is easier to interact with the user because we can use an event structure and using pictured boolean controls for the objects.
    But the arrows are still a problem. And perhaps the dead time is to long if the user works faster.
  • Draw it to a small picture control in an array, because we just need rows and no colums?

So our question is:

How could we program this UI: Picture control, Subpanel or something else?

Did anyone solve this by himself before?

 

Thanks for help and sorry for my broken english.

Hope i make it clear.

 

Oliver

Link to comment

I’ve used a single 2D picture control for similar work (no drag’n'drop, but I have full mouse-click logic including insert, delete, cut and paste, as well as “settings†and “disable†buttons built into the picture).  It’s not that hard once you have made a “what is the mouse over†subVI that accepts mouse coordinates (you’ll need a cluster/class to hold the known coordinates of your icons).

 

post-18176-0-21902800-1416922045.png

 

I would suspect that the VI server route would be harder.

 

 

 

  • Like 1
Link to comment

Hi drjdpowell,

 

thank you very much.

How did you select the place for the function block (fb) you want to insert:

- with a click on the wire or

- bevor the selected fb

 

Did you have a simple Demo of the surface, wich you can send us?

 

We planed to program it with classes so we can send each object the mouse event with the coordinates. One of them will be get active then.

 

 

Oliver

Link to comment

You had your answer right there in your question.

You can use the GOOP editor since it is open source.

You just need to join the GIT getting access through NI who bought it.

What Mikael did there is writing the graphical library of Java in LabVIEW from scratch if I remember correctly.

Link to comment

Besides that, if it is not a very complicated flow, maybe you can use a quick and dirty approach using pictures on the FP.

As a getting started point you could use the attached vi which is an improved version of what NI ships as an example for event handling.

I would love to see a screenshot of the results.

 


as for the arrows, maybe you could harness the power of the bookmarks and the auto arrows attaching to objects NI just added in the latest version.

However, as far as I know it is applicable only to the BD.

Dynamic Event Generation.vi

Link to comment

How did you select the place for the function block (fb) you want to insert:

 

I use the menu of the picture control, dynamically built in the “Shortcut Menu Activation?†event and let the User insert after the clicked-on icon.

post-18176-0-97811200-1416945455.png post-18176-0-91040500-1416946525.png

 

Did you have a simple Demo of the surface, wich you can send us?

 

Sadly, I do not.

 

We planed to program it with classes so we can send each object the mouse event with the coordinates. One of them will be get active then.

 

Should your “objects†know about the mouse?  My “analysis pipeline actorsâ€, represented by the icons, do not know anything about the picture UI used by the top level VI.   The top level determines what was clicked on and does the appropriate action or sends the appropriate message.

Link to comment

Hi all,

 

sorry i had to do some other work.

 

@ O_o: We already took a look into the UML editor from GOOP: :o  The code is horrible.

 

@drjdpowell: Thank you for your Picture and your inspiration.

Up to now we try an other way. We will report if we found a solution.

 

Thanks again

Oliver

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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