Jump to content

Wire'o'meter


Pollux

Recommended Posts

I just finished wiering pretty large project. And I was wondering how long is it really...

I have some C programmer friends who always discuss about their billion lines-of-code project.

I tought it would be fun to tell them: "My project is 3 million km long. :shifty: "

So, does such a toll exist?

If not, how hard would it be to write? (In LV, off course...)

Link to comment

Given scripting access, this should actually not be so hard.

Wires have a Joints[] property, which is an array of the points where a wire starts\ends\bends\splits on the diagram. Using that, you can sum the length of each wire in pixels (which you can then translate into KM). You might need some tricky logic to handle all the splits, but it should be doable.

Then you need to recursively traverse all diagrams and subVIs. <vi.lib>\Utility\traverseref.llb has a VI which will traverse the diagram and get all references of wires, but it doesn't exist in 7.x.

Link to comment

QUOTE (normandinf @ Jul 11 2008, 04:40 AM)

Kilometers of wires is cool, but it is too dependant on screen size...

That might trigger an habit of buying larger LCDs right before yearly evaluation period. :shifty:

That problem could easily be solved by just calculating the lengths in pixels, and then adding scaling parameters for physical screen size and resolution. If anyone is feeling really clever, you might even be able to get that information from the OS.

On the other hand, it would be easy to take a poll or two to find the most common screen size & screen resolution on LAVA, and call that the standard LAVA screen. Then diagrams could be measured in standard LAVA kilometers.

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.