Jump to content

Wire Style Guidelines for LVOOP


Recommended Posts

So as my mind was wandering around as it usually does, it occured to me that the creating objects is a bit more involved in G than in text based languages due to wires and icons.

It's a great ability to modify these, but sometimes I just don't quite know where to start.

And it occured to me that it would be great to have a common wire style guideline to help me determine what kind of object wires should look like what.

Sure I could come up w/ my own, but wouldn't it be great if the whole community came up w/ a common consesus on what kind of object wires should look like whatever.

example: LVOOP w/ references should use the chain link style wire, and all parents should use a black border, etc...

Any ideas?

Anyone already have their own they care to share?

Link to comment

QUOTE (Norm Kirchner @ Apr 4 2008, 10:45 AM)

Any ideas?

Anyone already have their own they care to share?

We consciously didn't put out any guidelines with the first release of classes because we wanted to see what developed in the field. This was something I was going to start asking about around NI Week, but it doesn't hurt to start here.

Some guidelines that have developed:

1) Do not attempt to mimic any LV native data type.

2) Try to avoid single pixel thick, single color wires -- you never know what LV will add as a native data type in the future.

3) Any class that includes a refnum in its data OR that inherits from an ancestor that includes a refnum in its data should use refnum green (RGB = 0x00c6c6), regardlesss of wire pattern.

4) Avoid using gray for the edge background color -- becomes hard to read on dynamic dispatch subVIs.

5) Do not ever use pure red (RGB = 0xFF0000) as a wire color. That color gets seen as an error condition. It screams out "fix me!!"

That's it for guidelines that I would recommend, based on the VIs that I've seen. There does seem to be a great reluctance to change wire pattern -- most classes just have the chain pattern with various colors.

Link to comment

This is one of those things I might regret admitting later, but I usually pick wire colors that match the foreground & background colors of the banner at the top of all the class icons for a given class. That has the advantage of producing wires that look like the class VIs they connect to, but risks occasionally running afoul of AQ's color guidelines above.

As for wire patterns, I pick whatever suits my fancy at any given moment. But I do gravitate toward certain things in certain situations. If I'm working on, say, an LVOOP instrument driver, I tend to either pick a wire that looks sort of like >>> or a set of dots. My brain seems to think that means this class transmits data on a real-life wire.

Link to comment

QUOTE (Justin Goeres @ Apr 4 2008, 02:24 PM)

This is one of those things I might regret admitting later, but I usually pick wire colors that match the foreground & background colors of the banner at the top of all the class icons for a given class. That has the advantage of producing wires that look like the class VIs they connect to, but risks occasionally running afoul of AQ's color guidelines above.
If you're using the 6 default colors that LV cycles through for the banners, you're pretty much ok with regard to the guidelines if you make the wire design match the header.

Someone suggested that the wire color should be set the same as the banner color by default. What would you think of that? For myself, it would bug me, if only because yellow makes a great banner color but a lousy wire color.

Link to comment

QUOTE (Aristos Queue @ Apr 4 2008, 12:34 PM)

For myself, it would bug me, if only because yellow makes a great banner color but a lousy wire color.

As an example just look at your Avatar and envision a yellow class wire :laugh:

Link to comment

QUOTE (Aristos Queue @ Apr 4 2008, 11:34 AM)

If you're using the 6 default colors that LV cycles through for the banners, you're pretty much ok with regard to the guidelines if you make the wire design match the header.

Oh, I'm much more cosmopolitan than that! :ninja: I always replace the default icons completely with my own, so the built-in banners don't apply to me. That frequently translates to banners (& wires) that are some sort of dark foreground color and one of the muted background colors from the color picker (although I frequently invert foreground & background on the wire design because I like the look better for whatever reason).

QUOTE

Someone suggested that the wire color should be set the same as the banner color by default. What would you think of that? For myself, it would bug me, if only because yellow makes a great banner color but a lousy wire color.

I don't have any immediate aversion to that, but like I said, I (almost) never end up using the default banner color anyway. It doesn't matter to me what color the wire starts out if I'm going to have to change it later regardless.

That having been said, it might be beneficial to cycle the default class wire color (cycling it with the banner would be a fine choice once you solve the yellow problem), if only because sometimes I don't fix the wire color/pattern right away and I end up with several class wires on my diagram that all look identical until I get around to changing them.

Link to comment

QUOTE (Norm Kirchner @ Apr 4 2008, 11:45 AM)

I agree with Norm. Just like Justin, I usually choose a wire color similar to the banner and mix with high-contrast colors when I'm using yellow or other light colors. But since I don't have a real systematic way of looking at it, I support this discussion before we all develop in mixed directions and become too conservative each about our own way to agree on a real practical "good wire design practices". If NI wants to see what's our reaction, well let's indulge them... since I won't have the privilege to have a paid trip to NI Week. :(

One thing I tried and let go quickly is using large size wires (5+ px) or even size (2, 4, 6, 8px). I don't know, it might be that I don't have any imagination, but I can't seem to be able to create a nice-looking 4-pixel wide wire! So I'm stuck with 3/1 or 1/1 configuration. Any suggestion here would help! And don't refer me to Bezier-style wires... :laugh:

One idea for colors could be to propagate the major color of a Parent Class to the Child Class (Parent's Edge foreground becomes its Child's Edge Background & Center foreground. A grandchild class would then look less its grandparent than it does its parent class... and so on.

http://lavag.org/old_files/monthly_04_2008/post-10515-1207367911.jpg' target="_blank">post-10515-1207367911.jpg?width=400

Link to comment

QUOTE (Aristos Queue @ Apr 4 2008, 02:34 PM)

Someone suggested that the wire color should be set the same as the banner color by default. What would you think of that?

When I wrote a LV Class-based app a while back, I tried to make the wire colors match the default banner colors. I used a darker, mustardy yellow with the yellow-bannered classes to make the wires look nicer on the diagram. I think it would be good to try to match up the wire colors to the banner colors by default. I would also like it if we cycled through more than 6 colors.

-D

Link to comment

QUOTE (Darren @ Apr 4 2008, 09:55 PM)

When I wrote a LV Class-based app a while back, I tried to make the wire colors match the default banner colors. I used a darker, mustardy yellow with the yellow-bannered classes to make the wires look nicer on the diagram. I think it would be good to try to match up the wire colors to the banner colors by default. I would also like it if we cycled through more than 6 colors.

-D

I agree that it would be great to have the wire color match the banner color, since I always change them to match. However the banner is colored for black text on the color, so it should have a high value (HSV color model). In contrast (lame pun intended), the wire (and the matching bundle/unbundle text) is almost always against a white background, so it needs a low value with the same hue. Unfortunately the best value numbers vary a bit with hue, but your local graphic designer should be able to tell the best way to get around this.

My preference is to use gray wires and banners for abstract classes, which are always intended to be overridden by an inheriting class

Link to comment

QUOTE (Darren @ Apr 4 2008, 11:55 PM)

When I wrote a LV Class-based app a while back, I tried to make the wire colors match the default banner colors. I used a darker, mustardy yellow with the yellow-bannered classes to make the wires look nicer on the diagram. I think it would be good to try to match up the wire colors to the banner colors by default. I would also like it if we cycled through more than 6 colors.

You're free to edit the VIs that control the new banners and private data control VIs to your heart's content.

<labview>\resource\plugins\lv_newclass.vi

and

<labview>\resource\plugins\lv_newclassctl.vi

The first sets a new class' banner, and you can add your own color cycling. The second sets the initial icon of the private data control.

Actually, the first one is slightly misnamed because it actually affects all library types -- .lvlib, .lvclass, .xctl, and .lvsc. I created it for classes and the other library types chimed in that they wanted the same behavior, and I didn't rename the VI.

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.