Jump to content
flarn2006

What do all the "Wire Pens" options do?

Recommended Posts

I was looking for a way to change the wire appearance of a class through scripting, and I found a property called "Wire Pens" on a class library object that does just that. Not only that, but it's possible to do things through that property that you can't do in the class properties dialog! A couple of things confuse me, however. Besides the obvious (colors, width, etc.) I've figured out that while the property accepts an array, it only works if there are exactly two elements in the array. (Otherwise it just uses the default "burgundy chain" wire.) The first one is for the inner style, and the second one is for the outer style. "Fill Pattern" is a cluster of 8 unsigned bytes, each of which determines the appearance of a single row of the pattern by its bits. I'm pretty sure all of the pattern types you can choose in the dialog are the same for every row, so it's interesting you can choose an 8x8 pattern here as opposed to just 8x1.

 

But there's four properties whose purpose I can't seem to figure out: Mode, Style, Fill Rule, and End Caps, all of which are enums. Mode can be set to various rendering modes, like Copy, Not Copy, Exclusive Or, etc. However, of all the options I've tried, only Copy seems to work; the others just crash LabVIEW. Which shouldn't happen, considering this isn't a private property. In fact, the property node is yellow, meaning you don't even need to have scripting turned on. As for the other three, they seem to have no effect. Style contains things like Solid, Dash, Dot, etc., but it has no effect on the appearance of the line. (Yes, I even tried with Width set to 1.) Fill Rule can be "Even Odd" or "Winding", which again, doesn't seem to affect the wire appearance. Finally, End Caps can be Default or Flat, and--you guessed it--it seems to do nothing.

 

So what are these options for? If it was a private property I'd understand if there were parts of it that appeared to have a specific purpose but didn't do anything (or crashed LabVIEW) but this is a public one, so I'd expect it to be more polished.

Share this post


Link to post
Share on other sites

Well I found this help on the property.

 

http://zone.ni.com/reference/en-XX/help/371361J-01/lvprop/lvclasslibrary_wire_pens/

 

I was thinking this was as simple as you forgetting to read the help but the help in this case isn't very...helpful.

Share this post


Link to post
Share on other sites

It isn't much but the Style member of the cluster is the same type as the Style member of the Pen input to the Draw Line.vi.

Maybe LabVIEW uses these routines internally to draw the block diagram?

Share this post


Link to post
Share on other sites

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.