XtraCAD.com

Fabrication CADmep™ => CADmep™ Wish List => Topic started by: jhoward on Nov 23, 2009, 06:36:25 AM

Title: New Public Property: True Outside Diameter
Post by: jhoward on Nov 23, 2009, 06:36:25 AM
I would really like to be able to know the true outside diameter of an piece of pipe without having to do a distance command on the object.

It would go along way to calm my doubts about what I want.... and what the service is using. Plus it would be really awesome for Visual Lisp routines. There are plenty of great uses for finding BOP at a given point that currently requires a ton of checks... that may still be off if I didn't interpret the material type properly. It leaves to many questions that will be geared towards a single system, service, or material type. So to date, I have been avoiding things of that nature like the plague.

An alternate points property that is a list of all possible "snap points" would work too. I could parse those and derive what I'm looking for.
Title: Re: New Public Property: True Outside Diameter
Post by: Tstright on Nov 23, 2009, 11:58:21 AM
Not to be a smartass or anything. But most coordinators that I work with know the OD's of the material they are working with.
Title: Re: New Public Property: True Outside Diameter
Post by: gambitjr on Nov 23, 2009, 16:10:03 PM
jhoward,

see if this is what your looking for:

http://www.ebaa.com/PDF/Misc.Pipe-OD-Chart.pdf

hope it helps!
Title: Re: New Public Property: True Outside Diameter
Post by: jhoward on Nov 23, 2009, 22:32:37 PM
thanks for the chart... its a nice reference to have around, but I think the point was missed.

I like small/generic/reusable code..... Programing for BOP at a specific end based on material is exactly what I want to avoid. If a public property contained the True OD you wouldn't have to do any of that crap to apply it to any service/spec. Plus I wasn't charged with managing the database (nor would I want to), so the person who does could possibly break something I wrote.
Title: Re: New Public Property: True Outside Diameter
Post by: Tstright on Nov 24, 2009, 00:04:45 AM
Quote from: jhoward
Programing for BOP at a specific end based on material is exactly what I want to avoid. If a public property contained the True OD you wouldn't have to do any of that crap to apply it to any service/spec. Plus I wasn't charged with managing the database (nor would I want to), so the person who does could possibly break something I wrote.

Not the way the program works.....
Title: Re: New Public Property: True Outside Diameter
Post by: jhoward on Nov 24, 2009, 03:39:45 AM
Quote from: Tstright
Not the way the program works.....

Seems a little vague. Is this your cryptic way of saying that they couldn't potentially change the Description property on an end type? there by disabling my check for that item.

I still don't understand what is so hard to comprehend that I "wish" to bypass that comparison->conclusion statement all together.

Even if those descriptions are set in stone....
It would take a lot of R/D to account for all possibilities and any potential additions. When one exposed floating point number could completely eliminate that problem.

Maybe I'm asking a to much. I just always prefer to work with something that is perfect like numbers vs something that is subjective whenever possible.
Title: Re: New Public Property: True Outside Diameter
Post by: c2k on Nov 24, 2009, 14:17:58 PM
Sometimes people don't notice which thread they are in (benefit of doubt).  Try not to take offense and keep on WISHING!  If the users don't have wishes and make suggestions the software can only go so far.
Title: Re: New Public Property: True Outside Diameter
Post by: Don on Nov 24, 2009, 15:07:48 PM
"It is better to take many small steps in the right direction than to make a great leap forward only to stumble backward."
Title: Re: New Public Property: True Outside Diameter
Post by: Andy Robins on Nov 24, 2009, 16:57:07 PM
try this in scripting

Code: [Select]
dim top = item.endlocation(1,"top")
dim btm = item.endlocation(1,"btm")
dim diam = item.dim[1].value

debug top - btm - diam

but then if we are giving you the Top and Btm in scripting you could just use that, no calculation needed.
Or consider Level Blocks, they will fill in those values anyhow
Title: Re: New Public Property: True Outside Diameter
Post by: jhoward on Nov 24, 2009, 23:06:17 PM
Thanks Andy!

I haven't tested it yet, but I think you just solved a few problems for me.

edit:
Code: [Select]
item.endlocation(End#, "btm" "top" "rht" "lft")
Did I miss any?

Level blocks only go so far. They are of no use for showing the elevation at a particular point like a wall penetration. Via lisp with this data I can generate one now :)
Title: Re: New Public Property: True Outside Diameter
Post by: cam-nav on Nov 25, 2009, 04:09:50 AM
Code: [Select]
item.endlocation(End#, "btm", "top", "x", "y", "z")

That is all. Don't think "rht" or "lft" are valid. I may be wrong.
Title: Re: New Public Property: True Outside Diameter
Post by: moatman on Jan 08, 2010, 23:15:59 PM
Can the endlocation be formatted in Feet and inches fractions?
Title: Re: New Public Property: True Outside Diameter
Post by: cam-nav on Jan 09, 2010, 00:14:51 AM
You can change it in the script to do so. I have one that outputs to an inputbox that shows feet and inches. But I think the inches are decimal.
Title: Re: New Public Property: True Outside Diameter
Post by: moatman on Jan 09, 2010, 15:51:53 PM
Can you give me an example of how to format a number in scripts.  I am looking to do something like the RTOS function in Lisp.
Title: Re: New Public Property: True Outside Diameter
Post by: cam-nav on Jan 09, 2010, 21:04:41 PM
Code: [Select]
dim quote = ascii(34)
rem gets the necessary item information for moving an item.
dim btm = item.endlocation(1,"Btm")
dim section = item.level("floor")
dim elev = number(btm-section)
dim mixedI = number(elev/12)
dim pt = instr(1,mixedI,".")
dim len = len(mixedI)
dim getin = right(mixedI,(len-pt)+1)
dim in = (number(getin)*12)
in = round(in,2)
dim ft = left(mixedI,pt-1)
dim BtmElev = ft + "'-" + in + quote
dim ElevChange
rem inputbox section of code for entering new elevations.
ElevChange = inputbox("Enter new Bottom Elev","Elevation change",BtmElev)

I only have item.endlocation(1,"Btm") because all MAP items pull the elevation text from end 1.
Then all I do is some math to get the number formatted into feet and inches.

The whole package can be found here: http://www.xtracad.com/forum/index.php?topic=4481
Near the bottom of the thread.

Edit: took off the "end if" in the code, didn't need it.
Title: Re: New Public Property: True Outside Diameter
Post by: moatman on Jan 10, 2010, 15:00:01 PM
Thanks cam-nav.  That was helpfull.
Title: Re: New Public Property: True Outside Diameter
Post by: ksperop37 on Aug 16, 2018, 16:21:22 PM
Can the value that is returned from this be rounded to four decimal places instead of only two?

Code: [Select]
dim btm = item.endlocation(1,"btm")
Title: Re: New Public Property: True Outside Diameter
Post by: acad2015 on Apr 05, 2019, 19:43:30 PM
Can the value that is returned from this be rounded to four decimal places instead of only two?

Code: [Select]
dim btm = item.endlocation(1,"btm")

I am also wondering if the value returned can be expanded to include 4 decimal places.