Community
AutoCAD MEP Forum
Welcome to Autodesk’s AutoCAD MEP Forums. Share your knowledge, ask questions, and explore popular AutoCAD MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extending Neighboring Conduit in Custom Schedules

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
itsjustintime
5189 Views, 12 Replies

Extending Neighboring Conduit in Custom Schedules

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?

12 REPLIES 12
Message 2 of 13
pothied
in reply to: itsjustintime

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.



David Pothier

Message 3 of 13
VitalyF
in reply to: itsjustintime

This is an example grouping of pipes and fittings by size

 

GroupPipeFittingBySize.GIF

 

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

 

 

 

 

Message 4 of 13
VitalyF
in reply to: VitalyF

Hi,

 

This is an example Schedule Table grouping of conduit with conduit fitting by diametr for AMEP2014 ENU 

For Conduit Global catalog

 

ConduitLength.gif

 

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

 

 

 

 

 

 

Message 5 of 13

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.

Message 6 of 13
VitalyF
in reply to: mdhutchinson


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

 

AECVersion_1.gif

 

AECVersion_2.gif

 

Message 7 of 13
jtm2020hyo
in reply to: VitalyF

how can I use your code?

Message 8 of 13
VitalyF
in reply to: jtm2020hyo

what are your problems with the formula?

just insert it into Schedule Table style, download example - ConduitLengthByDiametr.zip above

Message 9 of 13
jtm2020hyo
in reply to: VitalyF


@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?

Message 10 of 13
faugustom
in reply to: VitalyF

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

Message 11 of 13
seanmV8WWH
in reply to: VitalyF

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.

Message 12 of 13
faugustom
in reply to: VitalyF

Hi!

 

There is any way to include objects in xref's?

 

Thank's

Message 13 of 13

I'm trying to group walls and get total lengths based on styles and height for the store major environment checking but the AutoCAD file version not supporting at that time for the particular website and sheet is changing at the time of creating panel. 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost