View Full Version : total length of the Legs of PipeRuns
Loban
04-21-2011, 05:33 AM
Hello. Is it possible to create a SQL query that returns the total length of the Legs of PipeRuns?
Thank you
chintan
04-21-2011, 07:20 AM
With my understanding of ur question
Code is.
Code :
SELECT JNamedItem.ItemName, SUM(JRteStockPartOccur.Length)
FROM JRteStockPartOccur INNER JOIN
XOwnsParts ON JRteStockPartOccur.Oid = XOwnsParts.OidDestination INNER JOIN
JNamedItem ON XOwnsParts.OidOrigin = JNamedItem.Oid INNER JOIN
JRtePipeOccur ON JRteStockPartOccur.Oid = JRtePipeOccur.Oid
GROUP BY JNamedItem.ItemName
Can u please correct me LEG length mean including all Fitting/special part/Instrumentitem ?
Loban
04-21-2011, 10:56 AM
Thank you chintan,
I want to know lenght L=L1+L2+L3+L4
http://s015.radikal.ru/i332/1104/b4/75974aca7ed7.jpg
For elbows, follow relation pipe run--> turn feature --> part -->catalog definition.
You can get bend radius from view JFaceToCenter.
2xFaceToCenter to be added to straight pipe length.
I'm curious. For what purpose this value is required?
For hydraulic calculation, equivalent length of elbow is much larger than 2xFaceToCenter.
Loban
04-21-2011, 07:32 PM
Hi Tim, Thank you. These data are necessary for us to a rough estimate of insulation on all PipeRuns. Tim can you ask that's what - if the model you choose any PipingFeature and using Repositorybrowser(Ctrl+Shift+R) go on AlongLeg relationship, you can find an interface JRtePathLeg that has an attribute Lenght.
If you look at the attached picture, this attribute will be equal to L1 or L2, etc., depending on where it shall be the selected PipingFeature. Question - how to get this attribute Lenght using SQL?
Loban
Turn feature of elbow has two relation to legs. Each leg has attribute, length which is sum pf straight length of connected straight feature and bend part.
Relation view name is xalongleg.
My previous post can be much simpler.
pipe run--> turn feature (feature has IJRteTurnPathFeat which has bendradious)
Loban
04-21-2011, 08:52 PM
Ok, I understand
But why in the View dbo.JRtePathLeg missing columns LengthLocked and Length, which can be seen in RepositoryBrowser or SchemaBrowser?
I don't know. Ask Intergraph. Sometime such inconsistency found between schema definition and actual database.
You should give up to use this view and get radius for turn feature and length for straight feature.
Loban
04-21-2011, 09:16 PM
Understandable.
I have attached a very simple example)) but what if the straight section has various components - valves, special instruments, tees, etc., as to take into account their length?
For piping component like valves, you can get Face to Face length by following Part-->Catalog Part.(IJFaceToFace)
Each component has dimensional data in Catalog.
However, such component must need much amount of insulation than treating as straight pipe.
You might want to count number, size,component type and separately calculate amount of insulation off line on the Excel sheet.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.