Jump to content

Here's a challenge: Dynamically draw a topology diagram


Recommended Posts

Suppose there is a simple 2-D string array with 2 columns. Column A has values that have an "arrow" pointing to values in column B such that if A = {a, b, a} and B = {b, a, g} then the topology diagram should be displayed below. To make things simpler I am only interested in using "a" as the center such that there will not be values in the columns that don't subscribe to this scheme. Please also notice that a is pointing to g but g is not pointing back to a because there is no pair match (only 1-way). I only want to make custom controls visible/not visible as a complete last resort since the columns can get large. The position of a, b, g and the text inside a string can be visible/not visible however if need be.

If anybody has any ideas, you would be my hero. I don't believe LabVIEW is the right tool for this, but please prove me wrong. :)

I am using LabVIEW 7.1

g

^

|

|

a <--> b

Thanks in advance,

Billy T

Link to comment

An approach that immediately comes to mind is using the picture control - you will need to recognize the number of unique elements and how many connections each one has and decide where in the picture you want to display each one.

Drawing the arrows is a joke (just create a subVI which recieves the start point and end point and adds the arrow head based on the angle) and writing text is not a real problem (you can easily create another subVI which will even write the text in a filled circle or rectangle), so the main challenge should be the code which decides where to put each element.

Link to comment
An approach that immediately comes to mind is using the picture control - you will need to recognize the number of unique elements and how many connections each one has and decide where in the picture you want to display each one.

I'm thinking an OO approach using the picture control would be a fast and scalable way of making this happen. Maybe Mike H. from Endevo can help out with some ideas - after all, he put together the UML Modeller which does exactly that...

Link to comment
Yup, I'm currently using the picture functions for manipulation just as suggested. Just thought there might be something else I didn't think about. Thanks guys.

Billy T :thumbup:

You can do a lot with the picture control, but you could always try some Active-X containers.

E.g http://www.nwoods.com/

..and here is just a funny picture control example (I just it as a splash screen for my UML-editor).

SplashScreen.llb

//Mikael

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.