Pollux Posted July 12, 2008 Report Share Posted July 12, 2008 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. " So, does such a toll exist? If not, how hard would it be to write? (In LV, off course...) Quote Link to comment
LAVA 1.0 Content Posted July 12, 2008 Report Share Posted July 12, 2008 QUOTE (Pollux @ Jul 11 2008, 10:27 AM) 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. " So, does such a toll exist? If not, how hard would it be to write? (In LV, off course...) Hi, If it is possible, it will be using scripting and it will be tough. I'm not using scripting a lot, sorry... Slightly different you have the VI Metrics tool (Tools >> Profile >> VI Metrics...) that gives you a lot of informations : http://lavag.org/old_files/monthly_07_2008/post-7452-1215766712.png' target="_blank"> Hope this helps Quote Link to comment
Yair Posted July 12, 2008 Report Share Posted July 12, 2008 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. Quote Link to comment
Francois Normandin Posted July 12, 2008 Report Share Posted July 12, 2008 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. Quote Link to comment
Justin Goeres Posted July 12, 2008 Report Share Posted July 12, 2008 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. 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. Quote Link to comment
crelf Posted July 12, 2008 Report Share Posted July 12, 2008 QUOTE (Pollux @ Jul 11 2008, 04:27 AM) 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. " While it would be fun, if you're actually interested in comparing SLOC to your LabVIEW code, have a look over http://forums.lavag.org/Node-count-versus-SLOC-t3632.html' target="_blank">here. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.