Is it possible to, when creating custom tables in MEP 2014, create subtotals by diameter that include both conduit length and length extended by neighboring fittings?
Solved! Go to Solution.
Solved by VitalyF. Go to Solution.
Solved by VitalyF. Go to Solution.
You can certainly create schedules that show conduit length and sort that with sub-totals by diameter but there is no way to add in the length of the fittings on the ends of the conduit. It might be possible with custom programing but I don't think that it would be easy and I don't think that the fitting "knows" it's length either. There is no length property of the fitting.
This is an example grouping of pipes and fittings by size
This formula adds the length and quantity of all !!!! the pipes and fittings in this file.
Set app = GetObject (,"AutoCAD.Application") On Error Resume Next RESULT = "--" Set baseApp = app.GetInterfaceObject("AecX.AecArchBaseApplication.7.5") Set ActiveDoc =baseApp.ActiveDocument Set ObjectCollection = ActiveDoc.ModelSpace totLength = 0 n = "[PipeFittingObjects:PartSizeName]" f = "[PipeFittingObjects:ObjectType]" s = "[PipeFittingObjects:System]" q = "[QUANTITY]" For Each Object In ObjectCollection If Object.ObjectName = "AecbDbPipe" Then If Object.SizeName = n Then Ps = Object.SystemName Ps = Split(Ps," (",-1,1)(0) If StrComp(Ps, s, 1) = 0 Then totLength = totLength + Object.Length End If End if End If Next If f = "Pipe" Then RESULT = Replace( Round((totLength)/1000,2), ",", ",") End If If f = "Pipe Fitting" Then RESULT = q End If
Hi,
This is an example Schedule Table grouping of conduit with conduit fitting by diametr for AMEP2014 ENU
For Conduit Global catalog
This is the formula for calculating the length of the conduit and fittings for AMEP2014 ENU
This formula is designed for routing with - "Fixed radius" from catalog only!
see formula -
radii = Array(52, 65, 78, 104, 130, 162.5, 208, 320, 505, 631.5)
Set app = GetObject (,"AutoCAD.Application") On Error Resume Next RESULT = "--" Set baseApp = app.GetInterfaceObject("AecX.AecArchBaseApplication.7.5") Set sched = app.GetInterfaceObject("AecX.AecScheduleApplication.7.5") Set ActiveDoc = baseApp.ActiveDocument Set ObjectCollection = ActiveDoc.ModelSpace totLength = 0 d = Cint("[PartSize]") pi = 3.1416 For Each Object In ObjectCollection Set obj = Object If obj.ObjectName = "AecbDbConduit" Then If obj.Type = "Conduit" Then If CInt(Left(obj.SizeName, 2)) = d Then totLength = totLength + obj.Length End If End If End If If obj.ObjectName = "AecbDbConduitFitting" Then If CInt(Left(obj.SizeName, 2)) = d Then diameters = Array(8, 10, 12, 16, 20, 25, 32, 40, 50, 63) i = 0 If (InStr(obj.SizeName, "Bent") > 0) Then i = 1 ElseIf (InStr(obj.SizeName, "EMT") > 0) Then i = 2 End If j = 0 While (j <= UBound(diameters) and diameters(j) <> d) j = j + 1 Wend Dim ns(3) 'not Bent, not EMT ns(0) = Array(55, 55, 55, 55, 70, 75, 85, 85, 100, 120) 'Bent ns(1) = Array(25, 25, 25, 25, 30, 30, 40, 40, 50, 60) 'EMT ns(2) = Array(0, 50, 50, 50, 50, 50, 70, 80, 110, 135) radii = Array(52, 65, 78, 104, 130, 162.5, 208, 320, 505, 631.5) alpha = 0 Set propSets = sched.PropertySets(obj) For Each propSet In propSets For Each prop In propSet.properties If prop.Name = "PathAngle" Then alpha = CInt(prop.Value) End If Next Next L = ns(i)(j) * 2 + pi * radii(j) * alpha / 180 totLength = totLength + L End If End If Next RESULT = Replace( Round((totLength)/1000,3), ",", ",")
You can also modify the formula to group conduits by style, system, or(and) name!
Example with dwg file for AMEP 2014 ENU
Thanks you soo... much for sharing this...
I had a bit of trouble tweaking a version of your schedule.
We have our Standard Property Data Format set to UPPER case (out of the box, AutoCAD MEP - the Upper is the default) ... your code compairs the SizeName and SystemName to total length and fitting quantites. With UPPER case I couldn't get your schedule to total up. I tried using UCase() vbs function a couple different ways... but couldn't stumble on to the right combination.
I am just a bit concered with change our Standard Property Data Format case to 'As Is' ... as we use it in a couple other places.
I wonder if you might offer a suggestion.
mdhutchinson wrote:I had a bit of trouble tweaking a version of your schedule...
Hi,
Type command AEСVERSION and select the first two digits
what are your problems with the formula?
just insert it into Schedule Table style, download example - ConduitLengthByDiametr.zip above
@VitalyF wrote:what are your problems with the formula?
just insert it into Schedule Table style, download example - ConduitLengthByDiametr.zip above
nothing, I am just new in MEP, I want to learn. The code looks like I need to install Visual Studio before use it. Can you upload any video doing this table?
Hy All!
I'm trying to group walls and get total lengths based on styles and height.
Using this code I can get the total by styles, but not by height
Could you help me find where is the error?
thank's
I have inserted your table style using AutoCad MEP 2022 and it does not work for "standard" conduit objects.
I cannot believe Autocad hasn't made a continuous conduit length with bends a default output in a schedule.