Polyline molding-as-plumbing pipe length display


 Share

Go to solution Solved by Alaskan_Son,

Recommended Posts

I was (naively) thinking that %length% would work to display the length of a pipe.  Tried as many variations as I could find, all the online help references polyline area, but I've not seen anything for length.  I'm hoping to have it displayed in ft' in".  Is this easy, or are macros a whole new thing I need to go deep into?

image.thumb.png.d6ded045abe3fa809e9ce755003bd6c1.png

Link to comment
Share on other sites

  • Solution

If you're using a closed polyline, then %length% will not be an option.  As @DBCooperalready stated though, you can use %perimeter%.  The problem though is that you're going to get the entire perimeter of the polyline and not necessarily the length of the pipe that the polyline is supposed to be representing.  Assuming though that your "pipe" is a specific width and that and that its a pretty consistent width closed on both ends, then you should be able to use something like the following:

 

%((perimeter.round-8.in)/2).to_s("\'-\"")%

 

...where the number 8 is just double the width of the "pipe"...

NOTE:  I rounded the perimeter value just to avoid a more complex fractional inch value macro but this should work for a basic length.  Just make sure to replace the number to reflect the actual width of your pipe.

1592628575_pic1.thumb.jpg.a0705fd2382873161da09149aa1f0bdc.jpg

If you need anything more complex or need things tweaked further, please feel feel to reach out.  I do offer consultation services for this exact type of thing.  

  • Like 1
  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share