ࡱ> pacD@x l>@1<@x l>@18@x l>@14$l@1ll4x 0t ot8:NHM$@ HtH6ml8x <H v__SRP_0 __SRP_1Root Entry U=+CVBA_Project%e6 U=+VBA%e66<+PROJECTwm   !"#$%&'()*+,-./012345679:;<=>?@ABCDEFHIJKLMNOPQRSUVWXYZ[\]^_`abcdefgijklmnoqrstuvwxyz{|}~PROJECTThisDrawing__SRP_8 __SRP_9 B 8!"#$%&'()*+,-./0123569;<=?@ABCDEFGHIJKLNOPRSTUVWXYZ[\]^_`acdefghijklmnpqrstuvwxyz{|}~ID="{79B32601-6250-4CD7-9877-E432A49ABFFB}" Document=ThisDrawing/&H00000000 Module=CoverAndSlope Module=StructureDrop Module=Utilities Module=PipeLength Module=MaximumPipeSize Module=PipeCover Module=PipeToPipeMatch Module=RuleStringResources Module=SetSumpDepth HelpFile="" Name="C3DPipeRules" HelpContextID="0" VersionCompatible32="393222000" CMG="2624F3CD13354339433943394339" DPB="5A588F19C21AC21AC2" GC="8E8C5B55BBBDEEBEEEBE11" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisDrawing=48, 12, 939, 560, CoverAndSlope=32, 8, 815, 556, Z StructureDrop=32, 8, 765, 599, Utilities=48, 12, 781, 603, PipeLength=218, 219, 1227, 928, MaximumPipeSize=130, 54, 895, 503, PipeCover=70, 13, 835, 462, PipeToPipeMatch=86, 10, 851, 459, RuleStringResources=196, 120, 1007, 644, SetSumpDepth=198, 198, 1387, 733, rawingThisDrawingCoverAndSlopeCoverAnThisDrawingThisDrawingCoverAndSlopeCoverAndSlopeStructureDropStructureDropUtilitierU~~~~~~~~o    sUtilitiesPipeLengthPipeLengthMaximumPipeSizeMaximumPipeSizePipeCoverPipeCoverPipeToPipeMatchPipeToPipeMatchRuleStringR  dDropAmountdDropPreference y oPipeToGuideFrom CoverAndSlope6__SRP_ep__SRP_fStructureDrop;__SRP_2! __SRP_3 Utilities 9__SRP_4o__SRP_5bPipeCover9PipeLength(__SRP_cQ*__SRP_d MPipeToPipeMatch  h9MaximumPipeSize T'__SRP_a>__SRP_b:RuleStringResources(G__SRP_67J__SRP_74SetSumpDepth8VBA_Project_Version(_VBA_PROJECT1dir arrayPipes a (paramMapstrKey 8 qHnErrorstrDesc strSourceMyArrayoPipe 1X oStructuredValdValue2dLeftVal dRightVal !h oNetworkState xoSurface bCoverOnly ipes PwA@ng2#%H 1⢝"E,"x""+jK*mrU~~~~~~~~~~~~~~~~~~~F p[gAAY   a aa y XyQa y a  I A 9a y 9A Yaa y @I Aa y (!qa y A !)  C3DPipeRules ThisDrawing CoverAndSlope StructureDrop Utilities PipeCover PipeLengthPipeToPipeMatchMaximumPipeSizeRuleStringResources SetSumpDepthF /C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLLVBA i 0aE1F @u;C:\Program Files\Common Files\Autodesk Shared\acax17enu.tlbAutoCAD a @0FC:\WINDOWS\system32\stdole2.tlbstdole yPiCS5C:\Program Files\AutoCAD Civil 3D 2008\AecXUIBase.tlb AecXUIBase Y`iCS 3C:\Program Files\AutoCAD Civil 3D 2008\AecXBase.tlbAecXBase q p22A=SrWStructureDrop_ApplyRuleGetRadiusOfPipe:C:\Program Files\AutoCAD Civil 3D 2008\Civil\AeccXLand.tlb AeccXLandLib  62A=SrW:C:\Program Files\AutoCAD Civil 3D 2008\Civil\AeccXPipe.tlb AeccXPipeLib 1 72A=SrW<C:\Program Files\AutoCAD Civil 3D 2008\Civil\AeccXUiPipe.tlbAeccXUiPipeLib 1 Y  StructureDrop_GetInputParameters !StructureDrop_GetOutputParametersStructureDrop_ValidateRuleDropPipesFlowingOut62A=SrW #GetHighestPipeElevationByStartPoint  GetLowestPipeElevationByEndPointGetLowestPipeByEndPoint  FAeccXUiPipe.AeccPipeApplication.5.0GetNetworkState62A=SrWDoubleMapContainsKey22A=SrWLongMapContainsKey22A=SrWBoolMapContainsKey22A=SrW RecordError RecordWarning GetArraySize GetLowestPipe62A=SrW FuzzyEqualTo FuzzyLessThanFuzzyGreaterThanTestFuzzyLogic 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 133 134 135 136 137 138 139 140 141 144 14봀0* pHd C3DPipeR ules<@ = v 2m"G<Vrstdole>astdole h%^*\G{00020430-;C 0046}#2.0#0#C:\WINDOWS\sys@tem32\e2.tlb#OLE Automation0 AecXUIB4asGCcXUIBasK KE7BAE100-BF69-431B-9153-1FF0DEF8F613}#5.5KProgram Fi\BCAD Civil 3D 200 8\BVAEC H " Applic[ Libr0ary.D__]ډ ]3...Object7,@ |,cXLand3>A-]L\n@Lib@@/93KF32-4186-8DF9-3D5372B7DC57A^Da^a_$C1!deskiEngineering -@e0 7͵7P5p:762?77$7af0"7Ui![af7UM `77@1_"z78\HUI E qn Thi sDraw`@G@iDrVwng2a'H 1","x""+ bCoverAndSlopeG@@Bv1rAgSoaMO2\/k/&!.StructureDrop#Srucu%ea&a#J#WI/4j/Y+ Utiliti`esGi`$ie 9&2////N"7#eC&7#O#/)/+aA LengthGnL#+t@-Rq2'.M{ToQMXatcpTM5t#h+h22 E_ _ M@aximuma S\izp6Q x>mU-mSz`Q S 9_ (@=[  4IResourc.& A4iPAgR0 sq8cNOxs2OOC 2 SetSumpDep1)S` tSpBe@Ls)2p =h? ,p[9 Kp =h? 2? rU 2nrU~| 5 146 147 148 149 150 151 152 15322A=SrW62A=SrW (OuterDiameterOrWidth *LastPipeWallThicknessYj Ak,_^D{zyL$jq#!X1uK2KLI#s\ AcadDocument @|C.OPqG72A=SrWiCS72A=SrW "MaximumPipeSize_GetInputParameters #MaximumPipeSize_GetOutputParametersMaximumPipeSize_ApplyRuleMaximumPipeSize_ValidateRulePipeLength_GetInputParametersPipeLength_GetOutputParameters #.0000PipeLength_ApplyRulePipeLength_ValidateRule  CoverAndSlope_GetInputParameters !CoverAndSlope_GetOutputParametersCoverAndSlope_ApplyRuleCoverAndSlope_ValidateRuleApplyForSurface22A=SrWApplyWithoutSurfaceUpdateLastPipeElevation22A=SrW22A=SrW #.00VBE6.DLL  p FExceeds the minimum pipe length by fĤIx8<       bSurface not found, enter invert elevation to use:G"' GX:2A=SrW (OuterDiameterOrWidth *LastPipeWallThicknesam  *\G{000204EF-0000-0000-C000-000000000046}#4.0#9#C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLL#Visual Basic For Applications *\G{851A4561-F4EC-4631-9B0C-E7DC407512C9}#1.0#0#C:\Program Files\Common Files\Autodesk Shared\acax17enu.tlb#AutoCAD 2008 Type Library*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE Automation*\G{E7BAE100-BF69-431B-9153-1FF0DEF8F613}#5.5#0#C:\Program Files\AutoCAD Civil 3D 2008\AecXUIBase.tlb#AEC Base 5.5 Application Library.*\G{E7BAE300-BF69-431B-9153-1FF0DEF8F613}#5.5#0#C:\Program Files\AutoCAD Civil 3D 2008\AecXBase.tlb#AEC Base 5.5 Object Library:*\G{E932008F-0032-4186-8DF9-3D5372B7DC57}#5.0#0#C:\Program Files\AutoCAD Civil 3D 2008\Civil\AeccXLand.tlb#Autodesk Civil Engineering Land 5.0 Object Library:*\G{E9360002-0032-4186-8DF9-3D5372B7DC57}#5.0#0#C:\Program Files\AutoCAD Civil 3D 2008\Civil\AeccXPipe.tlb#Autodesk Civil Engineering Pipe 5.0 Object LibraryD*\G{E9370001-0032-4186-8DF9-3D5372B7DC57}#5.0#0#C:\Program Files\AutoCAD Civil 3D 2008\Civil\AeccXUiPipe.tlb#Autodesk Civil Engineering UI Pipe 5.0 Object Library   2mG qn ThisDrawing0>48bdb965ThisDrawingxCoverAndSlope0A48bdb96aCoverAndSlope&HkStructureDrop0;48bdb965StructureDropYH04jUtilities0<48bdb965~UtilitiesH/PipeCover0548bdb965PipeCover`)PipeLength0@48bdb96aPipeLengthHxPipeToPipeMatch0748bdb965 PipeToPipeMatch )MaximumPipeSize0?48bdb9660MaximumPipeSize=H(&RuleStringResources0=48bdb965L&RuleStringResources SetSumpDepth0:48bdb965SetSumpDepth,0`HxagO.FtD$$X]D ]KVP'@}3z~fbDK, Iwݐ&Ȃ]IIEM4@J:\Or}3'@CJ#u_A:1>ʣUV a AutoCAD" VBAWin16~Win32MacVBA6# C3DPipeRulesstdole` AecXUIBase|AecXBaset AeccXLandLibi AeccXPipeLibAeccXUiPipeLib< ThisDrawing5 _Evaluate CoverAndSlopeL c_dMinSlopeX c_dMaxSlopeMc_dPreferredSlopeqs c_dMinCover) c_dMaxCover c_DBL_MAX= (CoverAndSlope_GetInputParametersf4!(CoverAndSlope_GetOutputParameterst(CoverAndSlope_ApplyRuleo! errorHandlerO oNetworkStateAeccNetworkStateTA(GetNetworkStateoPipeAeccPipe CurrentPipeUDoStartStructure` AeccStructureStartStructureTbInValidStructureCEIsInlayoutModet(LongMapContainsKey ParamsLongRuleResourceString (STR_DROP_REFERENCE_LOCATIONv(DoubleMapContainsKeynH ParamsDoubleJ(STR_DROP_VALUEZ dDropValue2lDropRefdOuterDiameterOrWidth@dLastPipeWallThick$ValueKdInnerRadiusLastPipedInnerRadiusCurPipeqOuterDiameterOrWidth!t WallThickness'LastPipeElevation+oSurfacen AeccSurfaceSurfaceB(ApplyWithoutSurface(ApplyForSurfaceBO(CoverAndSlope_ValidateRule oParamsDoubleAeccPipeParamsDoubleK oParamsBoolmCAeccPipeParamsBool ParamsBool2 dMinimumSlopeZ dMaximumSlope$ dMinimumCover dMaximumCoverl strMaxSlopeF7(STR_MAXIMUM_SLOPE strMinSlopeB(STR_MINIMUM_SLOPE strMaxCover(STR_MAXIMUM_COVER6 strMinCoverS(STR_MINIMUM_COVERsErrMsgC^dActualMinCoverF MinimumCoverZTSetDoubleOnCurrentPartz (FuzzyLessThan(STR_MINIMUM_COVER_IS_EXCEEDED%SetErrorMsgOnCurrentPart\dActualMaxCovern+ MaximumCover(FuzzyGreaterThanj(STR_MAXIMUM_COVER_IS_EXCEEDED_dFormattedSlope~Slope#(STR_MAXIMUM_SLOPE_IS_EXCEEDED(STR_MINIMUM_SLOPE_IS_EXCEEDED (RecordErrorErroNumber- Description SourceG bCoverOnlyM> oEndStructure{ EndStructureodLengthLength2DdLastElevation~eFlowDirAeccPipeFlowDirectionq FlowDirectiondPreferredSlopeVB dNewPipeZYdCurrentMinimumCover{aeccPipeFlowDirectionStartToEndFindElevationAtXYD StartPointXoYlZqaeccPipeFlowDirectionEndToStartLEndPointy(UpdateLastPipeElevationobIsMinViolated arrMinPointsarrMinDifferences[ arrMinParams\n arrMaxPoints4arrMaxDifferencesN arrMaxParamsIsMinCoverViolated]dSlopeIncrement3dCalculatedSlope (FuzzyEqualToResizeByPipeDepths StructureDropy c_dDropAmount (StructureDrop_GetInputParameters!(StructureDrop_GetOutputParametersú(StructureDrop_ApplyRulep sDropValue{@sMaximumDropValue9sDropReferenceLocation^](STR_MAXIMUM_DROP_VALUE oStructureCurrentStructureF oParamsLong,AeccPipeParamsLongdDropReferenceLocationPartType lPipesCountConnectedPipesCountEoCurPipe&AddrinPipesoutPipesi`bFlowOut5bFlowInIsConnectedPipeFlowingIn~'IsConnectedPipeFlowingOutCoPipeIn* ConnectedPipe iInPipeCountq (GetArraySize oPipeOut iOutPipeCount inPipeCount outPipeCountdHighestOutgoingtdLowestIncoming|oLowPipeComingInB#(GetHighestPipeElevationByStartPointҮ (GetLowestPipeElevationByEndPoint(GetLowestPipeByEndPoint0(DropPipesFlowingOutt(StructureDrop_ValidateRulelVdMaximumDropValuestrNotification,(STR_RULE_APPLIES_TO_JUNCTION_STRUCTURES_ONLYbdActualDropValue%$ strErrorMsg(STR_MAXIMUM_DROP_EXCEEDED۱ dDropAmount@dDropPreference[oPipeToGuideFromoOutPipe8 eOutFlowDirb iPreference(GetRadiusOfPipecrownElevationToMatchT?invertElevationToMatch arrayPipesdHighestDoubledX dLowestDouble; oLowestPipeF Utilities%(g_UiNetworkApp\oAppAcadApplication  Application*oAeccAppAeccPipeApplicationGetInterfaceObject])Init\[oDocAeccPipeDocumentActiveDocument\ NetworkState0paramMapustrKeybFoundCount0vsDisplayItemz DisplayName(BoolMapContainsKeynErroraBstrDesc strSource (RecordWarning2MyArray Err_HandlerlerroQ[ errHandler } (GetLowestPipeoConnectedPipeNBPositiondValdValue2 dToleranceYabsoluteDifference8 :x B @ 4@ >x   B >  F` @ "  J Bh D F P@ P P "0 X z`  R 8@"x  4   R 80"h p 2x  "   "     ( 0  8  X h  $x     "    L P X p x  N   6  (  8  X h p :x  "     :  0 x$(C) Copyright 2004 by Autodesk, Inc. C++ w1By using this code, you are agreeing to the terms5and conditions of the License Agreement that appeared10.and was accepted upon download or installation4(or in connection with the download or installation)88of the Autodesk software in which this code is included.4All permissions on use of this code are as set forth;in such License Agreement provided that the above copyright:notice appears in all authorized copies and that both that-copyright notice and the limited warranty and7restricted rights notice below appear in all supportingdocumentation.;AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.7AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF@MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.:DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BEUNINTERRUPTED OR ERROR FREE.xDUse, duplication, or disclosure by the U.S. Government is subject to<restrictions set forth in FAR 52.227-19 (Commercial Computer=Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)@(Rights in Technical Data and Computer Software), as applicable.J *************************************************************************J *************************************************************************J ************************************************************************* Name: SetSumpDeptht Description: Sets the sump depth on a structure, plus sets the Sump Behavior property to "Control Sump by Depth".K --------------------------------------------------------------------------1 Returns input parameters required by this script2x- no input parameters defined for this script|820o(K --------------------------------------------------------------------------2 Returns output parameters returned by this script@2+ no out parameters defined for this script|H2@o82( Get the network stateobject]$8.4 4|k Get the current structure]D 4!. validate we have a structure |Hk@ Get the doubles parameters] 4!T.xE Hardcoded for Service Pack 1. Will globalize for C3D 2008 (Cannon).]  Sump Depth']8  x%`'H First we will set the structures' [Control Sump By:] property to Depth. ! (0 Now set the new sump depth value and we're done  ( Resize the structure B@|23RecordError Err.Number, Err.Description, Err.Sourceo@P20|(2 3RecordError Err.Number, Err.Description, Err.SourceoAttribute VB_Name = "SetSumpDepth" Option Explicit '(C) Copyright 2004 by Autodesk, 0Inc.LBy using t his cD, you are agreeoe terms6and)ndi{s ofLic@ense A5mentat a(ppeLd7wa s acced updownload or installaX0( 5nec with6)Hx softwhin wh,ic v in@cludedAll psiss뀫mneq$bset forth8,su+`provi.thboveiбnots authorizIcopi&eM]thTboBAa{'DzB e limit@>ranty mrescAs below! supp8@docuuBgDAUTODESK@ PROVI@ THISAGRAM "AS IS" AND WITH ALL F`AULTSB[ESPECIFICY DISCLAIMS Y IMPLIEARRANTY OF" MERCHABILIR FITNESS FOR A PARTICULAR U`SE. E*NCDOES N0OT WC@.ATE OPERATION73$WI/BEUNINTERRUPT&@@FREEAse, duL,disclosu׀A@U.S. G@rnsubj to5QFN3F@52.227-19 (CommercialTmprSE_- R?R!s)!B D2 7013(c)(1)(4iiAi(C Te chnic Da\tab` ), {pble`!B *?!` _ # ? & s: #Descrip"Jss dh `a tuctE, plus @? Behab Strc?kC S W= .CL' validwe DwF3 0do?7Bg+sD"Pipey?' HardMd!GrvP ack 1Wi!pglobzeQ2C3D8uannon)pT A 1Vr-1 "]# ad?J#0i .Value(YRw' First }wA !q%s' [bBy:] yd o .D;1 @=6.a7R S'3wql<3o)u(P3we'Бdonec= cS' P "&CByq&r P'-q b 'RecordEiP.Number, X~Sour~c4 6SS _B;SQTTq q  p  ы{ Zspdownload or installaX0( 5nec with6)Hx soft  qnxME(6 << <X 8 ʐRHʐVPHʐ( HʐXP Hʐ\ H ʐx H ʐ^ H ʐb@ Hʐd Hʐh( Hʐ8 Hʐ@ Hʐ,@P HʐV0` Hʐnhh Hʐrx Hʐv HʐP Hʐx H ʐ|  H"ʐ~ H#ʐ0 H%ʐ H'ʐX H(ʐ H*ʐ H,ʐJ H-ʐ. H/ʐb( H1101102103104105ʐNHʐPHʐT(Hʐx HʐZ Hʐ H ʐ` H ʐfh Hʐj0 HʐlH HʐX HʐpXp Hʐt Hʐ Hʐz H!ʐH H$ʐ<p H&ʐ H)ʐ H+ʐ8 H.ʐ\` H0(0`p(hX8hP xHP0@x@XLP %h1061071081091101111121131141151161171181191201211221231241251261271281291301311331341351361371381391401411441451461471481491501511521532`( L2mG$*\Rffff*0=48bdb965:: T Xhx(8HXhx(8HXhx(8HXh Px * , ,(`NResource string numbers that are resolved in C++ when posting error msgs, etc.code]$101]$102]$103]$104]$105(]$106P]$107(]$108x]$109P]$110]$111]$112x]$113]$114]$115]$116@]$117]$118h]$119]$120]$121]$122]$123]$124@]$125]$1260]$127h]$128X]$129]$130]$131]$133]$134]$135]$136]$137 ]$138]$139H]$1400]$141p]$144]$145X]$146]$147]$148]$149]$150]$1518]$152]$153`I These are duplicated below. Need to check if they are being used at all#Public Const STR_DROP_VALUE = "132"&Public Const STR_MINIMUM_COVER = "142"&Public Const STR_MAXIMUM_COVER = "143"Attribute VB_Name = "RuleSngResources" '8 st numbers that are r^lved in C++ when posting error msgs, etc.Public Const STR_COVER_AND@_SLOPE1 01~)STORM_SEWER%2%PIPE_NETWORK_RULE_CATAPLOGS43THISHNTAINS_%!4!ADJUSTS_(THEd5MINIMUex6AX7PREFERRE8 DETERES_IF8@>ABa_A_SURFAzC`9RAW 1^0 9xB_1vM9 vDROP_ACROSS_UCTURC,1v@MATCH_ WNN RoD ENGLINoINTCn)MOUND RnERTION_RIM_ELEVABCM#AsLENGT6HECK lW 25 6bak 5AT_PART_SHOULD_AbBY_AF`w_gING_7c :ceeBSIZǦk3úk"DIAM!!WIDTHB 4?_ONLY2>8朂29*_ EXhT49Cf>@{e"{1Io?x Opcx*M_B35BIPrLqN#5_JUNC\S5_So  B-5A> These—dupatbelow. Neto checkH ifeyb2e!usll.bU31 '^}40G%c+Q $101]$102]$103]$104]$105(]$106P]$107(]$108x]$109P]$110]$111]$112x]$113]$114]$115]$116@]$| "qn=xMED @ 6 B z <6 PLPLP LLPL\ of `.B for`@8h Li`B6 ided E@(righ %` `H``x@0% (`H0`x8<J@p @d @L @D @0 @. X`.@, .@ %@ @ @ B`@2mG$*\Rffff*0?48bdb966*\R6*#9d*\R6*#69*\R6*#92*\R6*#6b$*\Rffff*0<48bdb965*\R6*#61*\R6*#61*\R6*#4b*\R5*#2d2*\R5*#2bb$*\Rffff*0=48bdb965*\R5*#2bb*\R6*#4b*\R6*#4a*\R6*#4a*\R0*#f) * 0 8 8@ <x 4 : >0 :p B @ 48 >p   B > FX @ "  J B` D F 8 P@ P P &0 X @`  4  R RX 8"   R 8h"   "  > & 8 "@ H  "P x               ( 8 @ H P  Bh       B 08 h p "x             D 0  H P  X  h         :  ( $(C) Copyright 2004 by Autodesk, Inc.1By using this code, you are agreeing to the terms5and conditions of the License Agreement that appeared.and was accepted upon download or installation4(or in connection with the download or installation)88of the Autodesk software in which this code is included.4All permissions on use of this code are as set forth;in such License Agreement provided that the above copyright:notice appears in all authorized copies and that both that-copyright notice and the limited warranty and7restricted rights notice below appear in all supportingdocumentation.;AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.7AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF@MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.:DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BEUNINTERRUPTED OR ERROR FREE.DUse, duplication, or disclosure by the U.S. Government is subject to<restrictions set forth in FAR 52.227-19 (Commercial Computer=Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)@(Rights in Technical Data and Computer Software), as applicable.J *************************************************************************J *************************************************************************J ************************************************************************* Name: MaximumPipeSize: Description: Checks the maximum pipe width or diameter.. Parameters: Maximum pipe diameter or width Type: doubleK --------------------------------------------------------------------------K --------------------------------------------------------------------------1 Returns input parameters required by this script None requiredoK --------------------------------------------------------------------------2 Returns output parameters returned by this script@ None requiredo88 Empty implementation but required as it will be called. This is a Validation rule onlyo2 Get the network stateobject]$8.4 4|XkP]D  4!. |k]@ 4!T.x Ensure params are valid x|k]` < 4%N':; Now get the Maximum pipe width or diameter parameter value]x : x%`'>]]'@; Loop through all the connected pipes and find the greatest) violation and report that particular one]'B . !$ ] . %:.D D!F > 'B] D!F > '  @ '@] D!F#.00$X'H : H 4B@kk . Report findings]( B J 4%N'` : ` 4B@k02(3RecordError Err.Number, Err.Description, Err.SourceoAttribute VB_Name = "MaximumPipeSize" '(C) Copyright 2004 by Autodesk, 0Inc.LBy using t his cD, you are agree6orantyF m rescAs bel ow! supp8@docuuBgDAUTODESK PROVIA@ THISAGRAM "AS IS" AND WITH ALL FAULTSB[ESPECIFICY DISC LAIMS Y @IMPLIEARRANTY OF"MERCH ABILIR FITNESS FOR A PARTICULAR USE. E* NCDOES NOT WC@.ATE OPERATION73WI/BEUNINTERRxUPT&@@FREEAse, duplicL,disclosu׀AU.S. G@rnsubj to_kBFN3F@52.227-19 (CommercialmprSE_- R?R!s)!B D2 7013(c)(1)(iiAi(C Technl Datab` ), {"pble`! OpBwExi`V *?! o& : ! Descri$: Checksml p`d~@di$MA Par]cs e wi Typeb:dou`5-?" _ 'A ReturinN pF requirʂjAh) Pic SubM/_GetI''(^!"'Nonef E ?))outNoa_! O? '> O aA OՄ_AAr0oughBconŰVavcfi7̰>sP1' viorep@&`ulafr@L~bVp B`ooleat== Fals JFKi0 0Lo3@ =.C Q3sCou@- 1C5"pLwArd=(4.I%pru0Orc#> "M'aZTr(o""!lad(=  0u -w Y (k0d= kDim dWidthTwoPlaces As Double  = CDbl(Format(iterPipe.InnerDia$me"Or, "#.00"))oNetworkState.Set}OnCurrentPart strMaxTLocalize d, ]End If Next i' Repo;findings DGErrorMsg1Str If (bViolation = True) TheNn"= RuleResource/(STR_MAXIMUM_PIPE_SIZE_IS_EXCEEDEDW$&+NG0IeDHandler:'Recor d @.Number,DescripGS; Sub, 0Inc.LBy using t his cD, you are agree6o0 :p B @ 48 >p   B > FX @ "  J B` D F 8 P@  P \ "`h "px "    "        (8@ HP  `px    8    (  @X  @p     : 0 4P           >  ( 0 H  0X &         0 @  H P  X  Bh L     ( 0 8  ,@ p     H    (0 X &`  &        ,0`h  B  4$ 8  V@      , 08  BP  4$   P R` ** Ph  p   :  & "   ( 0  @PX `h  x      H  0@H  P`h  ,p &  : @ P$(C) Copyright 2004 by Autodesk, Inc.1By using this code, you are agreeing to the terms5and conditions of the License Agreement that appeared.and was accepted upon download or installation4(or in connection with the download or installation)88of the Autodesk software in which this code is included.4All permissions on use of this code are as set forth;in such License Agreement provided that the above copyright:notice appears in all authorized copies and that both that-copyright notice and the limited warranty and7restricted rights notice below appear in all supportingdocumentation.;AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.7AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF@MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.:DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BEUNINTERRUPTED OR ERROR FREE.DUse, duplication, or disclosure by the U.S. Government is subject to<restrictions set forth in FAR 52.227-19 (Commercial Computer=Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)@(Rights in Technical Data and Computer Software), as applicable.J ************************************************************************* Name: PipeToPipeMatchJ Description: This rule is currently intended for laying out pipes only.V It is intended to ensure that pipe ends match up at the same elevationo@o2p Get the network stateobject]$8.4 4|k] 4!>. Check validity of Pipe |k] 4!T.x x|k]  4!L. |PkH2 Get the Match type and drop amount from the pipe.]@]X]p V 4%N']  4%N'  %`'  x%`'9 Get the start structure so we can find the previous pipe] !D.@''''''''''''''''''4 This is a Pipes only rule. Check if the connecting* structure is NULL. If not null, we bail.- If no starting structure, we're bailing too. kStructNull = 101 @|Hk@ @! e|(k 7 Get the lowest incoming pipe to our starting structure]] . @!$ . @%4 * Do we need to initialize our lowest pipe?  If not, compare the elevations  . @%:. d] . @%:.8 8!! !! 8. kkk .; If we don't have a previous pipe to our starting structureF then just bail out of here since we cannot match without another pipe |k]]0]H]`% Get the stored values, if applicable  4!L%`'"  4!T%`'$ !f'& !h'^A Calculate the inner radius of the last pipe made before this one]x & ^ 'b! Calculate radius of current pipe] !f !h 'd Drop Reference Location values: Match Crown 0 Match Centerline 1 Match Invert 2] !'(  Crown& Get elevation of previous pipes crown] !! b 'r< Set the z for the current pipe to the previous pipes' crown r !(. Now subtract our inner radius and drop amount !! d $ !(kO If its centerline, just set the new pipes Z to the old one, then subtract drop  Centerline !! $ !(k  Invert& Get elevation of previous pipes crown] !! b 't< Set the z for the current pipe to the previous pipes' crown t !(. Now subtract our inner radius and drop amount !! d $ !(kI Do we want to preserve slope or just set the end point to the starts' Z?K For now, we'll preserve existing slope. Also, set the last pipe elevation !  !! ( ! !( !! 4(j ! e !! ( ! !( !! 4(jk  Now resize the structures @B@2X 3RecordError Err.Number, Err.Description, Err.Sourceo Validation? Do anything here?2 ]0$8.4 4| k ]P 4!>. Check validity of Pipe |P kH ]p] !. !D.@A Should always have start and end structures (null if pipes only) @| k | k & Not sure if this validation is right? ! e @! e , 4%N . 4%N 4B@| k 2 3RecordError Err.Number, Err.Description, Err.Sourceo XAttribute VB_Name = "PipeTo(Match" '(C) Copyright 2004 by Autodesk, Inc.LBy using this cD, you are agree6orantyF m rescAs bel ow! supp8@docuuBgDAUTODESK PROVIA@ THISAGRAM "AS IS" AND WITH ALL FAULTSB[ESPECIFICY DISC LAIMS Y @IMPLIEARRANTY OF"MERCH ABILIR FITNESS FOR A PARTICULAR USE. E* NCDOES NOT WC@.AE OPER`ATION@EI3WI/BEUNINTERRU0bourceC(STR_DROP_VAL ?cub?c#`Іcom"`7=eS#AZToq.AgaӏhiAaIntegxFa z(.CedsCJ .I!sF In(i)#a1' D3neinozur $?P0&,mpر6f%q  ?#)pj8'K(i - 1HDaxEls$5InE@ Set oPipeIn = oStartStructure.Connected(i - 18)  "If.EndPoi@nt.Z <(ToMatchAg ainst ThenLj <6x If  Next i'& we don't have a prev@ious p to our sqing to just bailf here since/cannot m without a 3&Is NothA Exit Sub~CDim zGuidei As D oubleDropAmount! LastgDiameterOr Width WallThickM q' G@RWored values, if applica*2Networkte.ParamsLong.V!A(str=Location;J 2dGLt.Ou?OQ GNne ss' Calculate !+i~r radi@[ofbl@9\made bef/ is ondCׅ IIA R" E:dq= ($-hg* 2)) x/ 2)curre@Vv-xCur!1Eo` A5( 2 !H RefAES^: uCrown 0erline 1mInvert'# OriginalSlope. MiBC dTy` = 0 3)!H#|elevbp Pxs cBEedg 6lne+ TC ' ' hz forg Nġk' ESAE=CsNow subt8rac͠j{and d \ a2\'-J !1sP/Snt hwiVt+,ss`nDew"Is ZUoldH,anAS)1)o(#ypBu<s#] 2U ; 3 3~i?3[Q 23\[!U`3e 3e\ 3H3O A  I3yq3! 0"" ı F`#3|: #'0Ѥwa`npFser0s\`Ibu4ep@pe42s' Z?' F!0now,P'll!existҮ. Also, g]S.FlowDir0ЗнaecczT0O9(dl* zLength2DoZ-64Qɇs Else`To* dqݯ nr/&E'w resizç0K$=RByqDeptherrorHp9leruRecordE P.Number,DescripScCV ' iJd҈?p&DoyG02 P ijc TBB_eRule(`$0 On5GoTo y c1A0'i'0Q2'orkState Is Nothing Then Exit SubDEnd If,Dim oCurrentPipe As` AeccBSet B= oNettw.=1' Check validity of U#If Z;ƀnStruct|urc8wr~t~+~x.  1 ' Should always have start aesqs (null if p@ns only)IWL"vX Bv' si .sÈation is right?2.PBTy<> 101 Or o8K xErrorMsgOnv[ RuleReso0urce@(STR_PIPE_TOMATCH ),LTRULE_APPLIESFONLY_RU\NSDqeA.H!Cler:%'Recordb .Number,bDescrip,S# ;C ? !e @!e , 4%N . 4%N 4B@| k 2\(qnxME8 6 < z6 PLPLP LL<<< @` 2 `  ? `p|+J `kPPN 5xnloa% ;t88of% ylXich %`@h4Al`d of `X for`8h Li``ided`righ`` x@h %` @8@esourcesRuleStringResourcesSetSumpDepthSp~| rU $ `$ `$ `$ `n$ `rU~|   a1Iy 0  0 @  8$ 8K x lxc px ,lp=tp ltcJpx lp=lp llctdx l>d1hDlhFL%l 0oDt\t8p6"B0t Pl0c,pkBt Tlp=(pD( oDo\p6D( oDo\t o o8p @p` @(H s\@@ lo@( ce@X am@ te@ 00@ raX@ 2mG$*\Rffff*0@48bdb96a*\R6*#9d*\R6*#6b*\R6*#92$*\Rffff*0<48bdb965*\R6*#61*\R6*#61*\R6*#4a*\R5*#2d2*\R5*#2bb$*\Rffff*0=48bdb965*\R5*#2bb*\R6*#4a*\R0*#f2 * 0 8 8@ <x 4 : >0 :p B @ 48 >p   B > FX @ "  J B` D F 8 P@ P P 0 P 4X   V T ^P  R * R@ 8"   4   "( P RX 8 "  2 0 8 :@  "  "   "         ( 8  H  h x    "         , 8 @ X ` p 8  &     ,   8 @ P 8h 4    D  0 :8 x$(C) Copyright 2004 by Autodesk, Inc. N1By using this code, you are agreeing to the terms5and conditions of the License Agreement that appeared.and was accepted upon download or installation4(or in connection with the download or installation) 8of the Autodesk software in which this code is included.4All permissions on use of this code are as set forth dou;in such License Agreement provided that the above copyrightwork s:notice appears in all authorized copies and that both that-copyright notice and the limited warranty and7restricted rights notice below appear in all supportingdocumentation.;AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.7AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF@MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.:DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BEUNINTERRUPTED OR ERROR FREE.DUse, duplication, or disclosure by the U.S. Government is subject to<restrictions set forth in FAR 52.227-19 (Commercial Computer=Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)@(Rights in Technical Data and Computer Software), as applicable.J *************************************************************************J *************************************************************************J ************************************************************************* Name: PipeLength. Description: Checks the maximum pipe lengthP Parameters: Name Type Optional Default Value DescriptionN --------------------------------------------------------------X Maximum length double no 200.0 Maximum pipe lengthK --------------------------------------------------------------------------x$ Default values for input parametersK --------------------------------------------------------------------------1 Returns input parameters required by this script2 - no input parameters defined for this script|2 ! ! ! A@oK --------------------------------------------------------------------------2 Returns output parameters returned by this script@2+ no out parameters defined for this script|23RecordError Err.Number, Err.Description, Err.Sourceoxoh2X Get the network stateobject]$8.4 4|k Get the current pipe]D  4!>.: validate we have a pipe :|kx Get the doubles parameters]@ 4!T.x]`]x  4%N'  4%N'& Now get the MAximum pipe length value]  x%`'] :!  :!  ' #.00$X']  4%N X '`  ` 4B@k& Now get the Minimum pipe length value]  x%`'] :!   :! ' #.00$X'#Exceeds the minimum pipe length by X '`  ` 4B@k(] :!#.00$X'    4B@   4B@23RecordError Err.Number, Err.Description, Err.SourceoxַAttribute VB_Name = "PipeLength" '(C) Copyright 2004 by Autodesk, Inc.LBy using this cD, you are agree6oranty m res@cAs below! supp8@docuuBgDAUTODESK@ PROVI@ THISAGRAM "AS IS" AND WITH ALL F`AULTSB[ESPECIFICY DISCLAIMS Y IMPLIEARRANTY OF" MERCHABILIR FITNESS FOR A PARTICULAR U`SE. E*NCDOES N0OT WC@.ATE OPERATION73$WI/BEUNINTERRUPT&@@FREEAse, duplicL,disclosu׀AU.S. 2G@rnsubj tokB3F@52.227-19 (Commercialmp rSE_- R?R!s)!B D2 7013(c)(1)(iiAi(CA Technl Datab` ), {pble`! OpiBwExi`V *?! & A:  DescriB$: Checksmaxi mum p` lc Par1@s: F Type#/ BDefault ValuD Ae-8 MC uD `.0  ! _?# $:v$sA^[ p&-c' _ ?#ARetur`in+ requir`Ⅱ" Pic SubX%`_GetI!!( `< AOn Err uGoTo eH0aleB'definn)SExi.tQq9:MsgBox.Number +'Source EkP _?YoutnoooQaO2 rvCP%~ _T'RecordP},obA\yRuleA$a_1(_pFidate3Q' ,Pne@twork t eoqDim $oNSt As Aecc9S=5IfIs N`ThenS s+IfS currqL Aa " =.Cs' K2 we haPacSq B ?0 a do=\sRq SsD"!3t#?pbsLocal !Sngin ?] 1.L3(STR_MAXIMUM_LENGTHpX!le_MIN S'@*w g.MA>1"uPVd&C .2(T#Q@dDiffep/cs C).3D > 6߁ 9 -/n`= CDbl(Format(, "#.00")T '4&BV`m#!F IF.""EXCEED S_THEf#PIPE#_BY) & CStűr(dDifference)  oNetworkState.SetErrorMsgOnCurtPart strMaxLengthLocalized,,^ End If' Now get the Minimum pipe l^@ value,D0im d#x As Doubl= oams).VC(in? ~0-If +M.!3D 0 :p B @ 48 >p   B > FX @ "  J B` D F 8 P@   4 R *@ Tp * " " "   "( PX `  p  &    X Z8 X 2 ( 0 @  H X  Hp H 4  8         L XH    *  , H@     (    & & 0 H h   . 6 4 *8 h   6 B   @ X  `         ( >0 p "x   "         (  HX`  "h       L 8@  P`h  8p      (( PX` hp x        @0 p x    @    (  @ :H  $(C) Copyright 2004 by Autodesk, Inc.1By using this code, you are agreeing to the terms5and condition@x l>@1ll8x 0Dt :Nok Ht65:N`M$@ Bt`65:NXM$@ BtX6od9lDx <X q@x l>@1llDx 0od9l<x <` @ x l>@1ll<x 0d !pp "@ ! ," ! $">Ǥ>@ǨlY # 2)p(H0 xl4D8h<t4 @p0 X  XKtH lt= xttH llt=pttH plt=lt\H do\td\H To\tTLH XlLqPH l>1 H l>1H l>1H l>1 <$\lF%x 0 o\Y@tD$\l F%x 0 o\Y@t<oDt$\lF%x 0 o\t4\lF%x 0 o\t,oTX2tlP oo4t5\H oo\?9tH ,t ,t-lP- oo4t5\H oo\?9tH 0t ,tlP`mTtH ,t ,tlPmTtH 0t ,tlP5\tH ,t 0m\H 0 ,)t5\tH 0t 0m\H , ,)t lPn>\tH ,t 0o\o$od9H 0 ,)ts of the License Agreement that appeared.and was accepted upon download or installation4(or in connection with the download or installation)'R8of the Autodesk software in which this code is included.4All permissions on use of this code are as set forth';in such License Agreement provided that the above copyright:notice appears in all authorized copies and that both that-copyright notice and the limited warranty and7restricted rights notice below appear in all supportingdocumentation.;AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.7AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF@MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.:DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BEUNINTERRUPTED OR ERROR FREE.PDUse, duplication, or disclosure by the U.S. Government is subject tocture<restrictions set forth in FAR 52.227-19 (Commercial Computer 4!=Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)# G@(Rights in Technical Data and Computer Software), as applicable.y J ************************************************************************* Name: PipeCover. Description: Checks the maximum pipe lengthnefiK --------------------------------------------------------------------------e spec$ Default values for input parameters for jM This is a validate rule only but the ApplyRule method is expected here alongce b$ with the GetInput\Output parametersunctioo@o2 Get the network stateobject! ]$8.4, E 4ave at|xkp get the current pipe to work onpi]Dut con 4!>.:R Check if we are in layout mode. If so, we need to see if the structure drop ruleS exists on the connecting structure, and honor its drop preference. All this boils 4!R down to is to see if the network state has params from the drop rule, then adjust, the LastPipeElevation property accordingly.&!f] :!D.@st]  @'F&! 4!H F B The maps don't have a "contains key" method, but rather it throwsB an exception if we lookup something that doesn't exist so we need- to do key loop lookups before accessing them be   & @!L P 4%N$J @!T V 4%N$R @!TOuterDiameterOrWidth$R @!TLastPipeWallThickness$R a]8]P]h] F Now that we have a drop reference and drop value, calculate where theare Q starting position of this pipe should be and set the LastPipeElevation property. P 4%N @!L%`'Z V 4%N @!T%`'XOuterDiameterOrWidth @!T%`'\ a pipLastPipeWallThickness @!T%`'^ A Calculate the inner radius of the last pipe made before this one] \ ^ 'b ! Calculate radius of current pipe] :!f :!h 'd Drop Reference Location values:  Match Crown 0  Match Centerline 1  Match Invert 2 Z! Crown' Add the inner radius of the last pipe./ Subtract the inner radius of the current pipe.ip. Only matters when last pipe and this new pipe$ have different sizes during layout.'''''' 4!j b 4(j'' 4!j d 4(j'k` 0 If its centerline, just subtract the drop values < from the LastPipeElevation property since its CL by default- h Z! Centerlinetg 4!j X 4(j Sk Z! Invertipe sh 4!j b 4(j t 4!j d 4(jngkHk@k8] :!p.lbe lWN and 4 :A@rd 4 : lA@tnot k27 RecordError Err.Number, Err.Description, Err.Sourceheo2x Get the network stateobjecthe use]($8.4 4,$N| k Get the current pipe D]DHt goin 4!>.: Check pipe validityt thin : resiz|k Get the doubles parameterss]h 4!T.x Ensure params are validEr xion, E| kF Cover is only applicable to surfaces so ensure we have one of those..obje] :!p.l l4| k 2 Now get the Minimum and Maximum pipe cover values]]]]  4%N'.  4%N'ave a  x%`'  x%`'P" Now let's check the minimum cover]] ]8]P]Dherence]]]D 4!     :%'     :%'] :!' we  :! 4B@ C  :! 4B@ef: Check for minimum cover violation and report pass or fail]   4%N' enum k`   4B@ould b: Check for maximum cover violation and report pass or fail]   4%N'k   4B@at any2 3RecordError Err.Number, Err.Description, Err.Sourcee addeop h Attribute VB_Name = "PipeCover" '(C) Copyright 2004 by Autodesk, Inc.LBy using this cD, you are agree6otDzB e 0limiY@>ra0nty m rescAs `below! s8upp8@docuuBgDAUTODESK PROVI@ THISAGRAM "AS IS" AND WITH ALL FAUL TSB[ESPECIFICY DISCLAIMS Y IMPLIEARRANTY OF"MERCHABILIR FITNESS FOR A PARTICULAR USE.L E*NCDOES NOT &WC@.ATE OPERATION73WI/BEUNINTERRUPT&@@FREEAse, duplicL,disclosu׀A@U.S. GnCsubj |tokB3F@52.227-19 (Comm@ercialm*prSE_- JR?R!s)!B D2 7013(c)(1)(iiAi(C Technl Dat.ab` ), {pble`! OpBwExi`V  *'?! A: DescriB: Checksmaximum p@ lengy -?"Default valu@x`)& par@ [ATa @aiDdarulnXly `A+yRRme dAeLxp F helong GetIn\OutPubT SubU'_EP(BEC  fa On ErrGoTo eAH leZ#' `B"net work teogDDim $oNSt*As` AecciCSK= a!IfL Is NaThenE8xit,#!)Ifc#' gcurrSto o 'r !/M_  = ..C'1 i8f wPjp$Pmlaqt mp0Tsdo,ne&P see `euctMdrop +existncon|@6pC%8hon"pref,nce[ya2boil03'ƒR10*! hPI7s frombV ,n adjusI LastQEleva2L|Ёtccord0ly0N! &rtStr&ߓ.kSbInValidBoolea!g*,.IsInC M0 AP- .3 maps(n'tv% " ` ta key" L,RNracrowapn exq*lookuo t8DD( :NoDk Ht6mlhx < Bd, k6d x l>d1llhx 0<$x(lth dp\lth drU $ `$ `$ `$ `n$`rU~|   ay IaQ0  0 @  8$ XKS x lxc px (lp=tp ltcJpx lp=lp`pP1a72does'U+ #do 0pAs befoaT```*mw LVMapCon Key(ou.Ps0D.Q\`yource (STR_DROP_REFERENCE_LOCi҈))_ Do[ea(?le?3VALLUEoonseIl"O1DiSoOrWidth"? ? _:W`tcknessk)  4dDJ5us_lQpRef <d` dN  'fw@KZha4LS", calcue1 -Msrt3posfρ2hshould1ײ0 % E>RtQ "I!.B(x?3g?393{:te2/! !(22  dLastPipeWallThick = oStartStructure.ParamsDouble.Value("nnes0s") ' Calculate the inner radius ofl p made@ befor-i !ne]Dim 4dIRRQ As  == (dOuterDiameOrWi`dth - y * 2)) / 2L {vcurr8entu kCu^rסjjo.lCFAr6Dro@p Refe3ce Location vAs:K6'Match Crown 0@Ferline 1InvertÅ^K If lA&&0 Then aAK K' Addߧ.QSubtractI}RPOnlyts w-Gan%@newЍ/hav e difBdt sizes during layoutooNetworkStu.%_Elev;}<+q? Ñ? '-/* ^ +E)Ifk' Hits cQ, jus;*Tq}A93=K !Q 0ExitE' kSr    ?Mc21zhebUidityS  A 0 ^SW ds pqQsS ()m?'0 Ensss aS??4`a. P"a>ica0 to AFs s.c we ҅o`ose.Ԅ >yI pQ.#SQe 'Mw gt8Minimum MaxR&cuedPAqd`!strIStin6C$IResbM(STR_MAXIMUM_COVERK'auoleo_MINn3 g,8 W let'bAU>mrcbIs0Viod{ax{arrP0Poin0+VarianZDcp_%c":PzyaxQ axO ` Pipe.IsMinCoverViolated(d, arr0@Points4Difference$ParamsP) baBx = oaNx Zax haxh hnDim eFlowDir As Aeccpectio>n*&oNetworkSt.SetDoubleOnCur{tvt st g,pimum $Max$'' Check for minɁ c vt and report pass fail _ErrorMsgMStrin"g If rinrTheRzUJNRuleRes ource(STR_MINIMUM_COVER_IS_EXCEPEDEDE0If!d-d&I?R[R@SaxSƏSSAXS@)R)geHHNler:'Record! .Number,bDescr,iprSBD a?SubAceed to see if the structure drop ruleS exists on the connecting struct/qnxME\  @06   0z00~0<0B> "LPPLPLPLLLL<`+J`p Pk !!A) %ithat`x `. v`h+P`  ""b)%iH AL` `.@` `|+i OT Wii ` 0iP!LipidthiLast+>` i +pp` 0);P%`be pi+8` (()  %% |idth%`.Last 0@!%+ `8kx i  ^i! C`purre`h!f+ ` xk( i H 0i`x t 2+ `xk iX innei.`x iPip  ` 44`reei`ꐀ Hp8P~ 9xX 0 @p (  #AeccXUiPipe.AeccPipeApplication.5.0`0 0 h H P8h 8 P  `Jz h .@p @x n ! P  @l x x J@X P@T @P x  NhH h P 8 `Rz !h  b'p@p @ n ( / C@l vali  e comi@X P V@T @P . $rM(h0H0hH`z ion X0e. If than ious pipe, me xp X8`zx l>`1h`x l>`1d@lhFH%l 0o@tX@t `o@oXG@t `o@oXt88:(N8MH@ Ht86&` x ll`o8#*12`llhx 0@ldFH%l 0o@t@t `o@o@t `oo@t8:(NMH@ Ht6 o#`*1/`lldx 0D@t `:(No@k Ht6mldx <mlhx < X<$xhldt$`p\6 o#`rU (`4`Yy=904`Yy=04`Yy=00!` (000I` (00(q`!/,`9 =4`q=Q, `++, `++,9 `++$a `n++$a `rU~|   qa I Kp$ tlp=tp ltc< c=xpt xlp=lplt=[pl ppl 0lp=hpph hlp=dp ldx8 xdhtlpK cpzpx"vpH $ lpcl(PTkvDX%H 8 T ( >P1hT lh0px vdlHkxpzpz ,(hPTK cpzpx"vpH $ lpcl(PTkvDX%H 8 T ( >P1hT lh0px vdlHkxpzpz ,(hPT0   8$ 0   0   0   0 p  H-C6?tp# kH8 8Bth6H8 ohoppzy DH$ H8l<px ll )pxkxpz <$ l<px ll )pxkxpz <$     J !"#$%&'()*+,-./012345789:;<=>?@ABCDEFGHIMKLNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ H 8-C6] @X @H h@8 Xp`z X  2mG*\R6*#9d*\R6*#92*\R6*#90*\R6*#8e*\R6*#6b*\R6*#69$*\Rffff*0<48bdb965*\R1*#196*\R7*#3*\R7*#5$*\Rffff*0>48bdb965*\R1*#17a*\R1*#17c*\R6*#61*\R1*#17c*\R7*#0*\R3*#0*\R7*#2*\R7*#2*\R5*#2b9*\R5*#2a3*\R5*#2bb*\R0*#1520B0 8 @H  X hpx        B    (08 @H P"X x(       B      (0 8"@ `(h        B        ( HP  hx      "   "    B     0 8 @ H B  P  X  hx &    B       6  8 HX` hp  d   r  <        ( 0 B 8  @ H  X #`   x   B      "      B      "@ H  P X ` " h p                   ( @  H $P .x                 (  0 H  P X h ]$#AeccXUiPipe.AeccPipeApplication.5.02@]` !.de agreei.8zk]  %.  B@] !.] !.4 4.8z2i2 4'Rzk]h'] . ! 4Al] . %!'od  'kH . 'Rz(2 'Ri2 %'Jzk]8']P . ! ]h . %!'   'k` . 'Jz@28'Ji(2 @'zk]']  . ! ]8 . %!'  'kx .J 'zX2P'i@P Not usedo  Not usedo    '>z'>i N' :'pzxkp]X :!f :!h 'b4 b'p0i(p '].|/ Check that we have a valid structure coming in' P V |. scopezk] . !$rM] Is this pipe flowing out the structure? Warning...Connectors are 1 based and not zero based.$] . %:. l Check the outer lowest elevation of the pipe. If its lower than the previous pipe, make it our lowest pipe( | .|00$ !! !f |!! |!f e 4 '|k .4B@ |.zi8]-C6?']   %'   'zpih]h'     $ 'k 'zi]'     $'k 'zi  Do simple checks]X]p@'333333@'  $ 'k(  $ 'k  $ 'k  $ 'k '''''''''''''''''''''''''''''' ( Reassign to within the .0001 tolerance.C@'  $ 'k   $ 'k  $ 'k  $ 'koAttribute VB_Name = "Utilities" Public Const g_UiNetworkApp As S|nghAeccXUiPipe.Hxati@on.5.0Func* GetPState()T>  On Error GoTo e HandlerDim o0Acad Set = ThisDrawing.IfIs 0NothenJ' cE0xit { End If]F a=P.BInterfaceObject( )o0.InIJC Docume|ntCA .Asve IsKxERo @. ?G"^ C` :AAdhAĿ DoeMap@tainsKey(paramLPs , s8!>bFouQ zD=  iaULgnFqi 0& rE.C` t 8- 1 ;sDisplayg  = Item(i).Dᒃg!D+ThrfT ru mNext< iP9`c EE. @ImILong?Ie#IHHEUH/"H).HHpHaHC??I3 L?I ?I D@r7I&#HnmHvHHH_$rvH^q _$pH?$7H H0H#r} Hp.HD#=E^Hd HH#`6##!4$Sub Recordr(n㕰!)r"Desck"Sourcew\a' usedcOpWarn)trr bvz`ArraySize(ByRef My VariantgRx k/_X/ )UB!s(T)nL+p߮dpH0&9dRadiusOf(oQAaRjqP$F: bQq  A=c3Q8dInnerLastU M?p#.O`r Di@@OrWidthPWallckness * 2)) /| 2S p>@" 7mZ!Lowe(o4ucturr4rXoc=S' Check that we have a validM com; iϳ #dqZ# ?$ 9$$|cAKQEa1' `a'ctedA'sgcS' p s p floAP out e? $M..eors a1 baQ not zero#.wrPnۓ  {`# (i11ck the outer lowest elevation ofpipe. @If itsr \anprevious J, mxakeL0 L oLP Is Nothing Then'.Set ,= oConne0cted=-El seY .PosBi.Z - :.ODiame}OrWidth \ 2 < 9 !\c$and Next iGetExit Fu nc errHandlher:E Public zzyEqualTo(dVal@ As Do@ eD, ue2)Booleas2Dim dTrance K H= 0.0001 KabsoltDiffe reP = Ma@th.AbsC7-%5)FuGE = (<;PfI "dLessThan(dLeftMeRigh ebRm;F7p= Fam"p(L`}IdH&)PhTrueK%Ifb5&5l/eaa1 Grea`_2^_2_2_2f H2> d_2I_2 B_2(?em&2 P LPLPPLLLLPLNPR@h @ ` @8 @0 @, @& @ @ 0 k@ @k0 TXp0H@p( 8Ph8VP\>NP@h @` @0 @( @$ @ U@ U@ ~8O b0#^+#^+#^^   h 0 2mG*\R6*#6b$*\Rffff*0;48bdb965*\R6*#9d*\R6*#69*\R6*#92*\R6*#90$*\Rffff*0<48bdb965*\R6*#61$*\Rffff*0=48bdb965*\R6*#61*\R6*#4b*\R5*#2d2*\R5*#2bb*\R5*#2b9*\R5*#2bb*\R5*#2b9*\R6*#49*\R6*#4b*\R6*#4a*\R6*#4a/ * 0 8 8@ <x 4 : >0 :p B @ 48 >p   B > FX @ "  J B` D F 8 P@ P P $0 X 8`   V T rX  R *0` 8x "  "  "    "  (  8 H P X p     (       (  8 P X ` h  *p F J N8    X X dh     2 6( `  h >x D     ( L8 .0 00 & %  (   ,0 `    T 4    8 @  .H "x   <    6  Xp   6            0 @  6H                 $ @H P`  Fp   @ @  @` 4  > > >X @ > " @HP  X h x      0 $    ( :0 p "x    "    0  HX  (h      8  (8PX `hp  Fx J N `x  X X bX   2 6P      . "    <( hp   6    6 8 @  H  h p        6      ( 0 @  P  h x    $    F 0 H P  RX R !!  ! (! 8! @!  P! h! x!!!! ! ! :! " "  " (" "0"X" `"  p"""  ""  " """  "## # # D(# p#x# #  >#  # # @$ *H$  x$ $  $$ $$ $ H$ P(% Lx% T% * & P& h& &  & & & &  H& ' '  (0' X'`'  ,p'' '''''    :' 28( p(((((   ,( ($()$ )H)    P) X) p) @) .)  )* *(*H* P* X* h* 2x* :* 2* (+  0+@+`+p+x+++   ,+ +*+ ,*(,X,   `, Bh, 4,  ,,-0-  8-@-`-x- - 4-  -- -- . .  . (. 0. B  8. @. H.P. X. x.. . 6. :. </ X/  x// // / // / / :/ (0 B  00 80 @0H0 P0 p0x0 0 40 :0 :1 P1  p11 11 1 11 1 1 :1  2 B  (2 02 82@2 H2P2 X2 x22 2  2 2 2 2 2 23  33   3 (3 03 @3$(C) Copyright 2004 by Autodesk, Inc.1By using this code, you are agreeing to the terms5and conditions of the License Agreement that appeared.and was accepted upon download or installation4(or in connection with the download or installation)8of the Autodesk software in which this code is included.4All permissions on use of this code are as set forth%;in such License Agreement provided that the above copyright:notice appears in all authorized copies and that both that-copyright notice and the limited warranty and7restricted rights notice below appear in all supportingdocumentation.;AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.7AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF@MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.:DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BEUNINTERRUPTED OR ERROR FREE.DUse, duplication, or disclosure by the U.S. Government is subject torictio<restrictions set forth in FAR 52.227-19 (Commercial Computerware -=Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)s in@(Rights in Technical Data and Computer Software), as applicable. *J *************************************************************************J *************************************************************************J ************************************************************************* Name: StructureDropL 1 Description: Enforce a drop rule for each pipeP Parameters: Name Type Optional Default Value Description N --------------------------------------------------------------ramel Drop Value double no 0.5 specifies drop amount for the structure------K -------------------------------------------------------------------------- $ Default values for input parameterson]D? Ma2 Input\output params not used but these are calledo@Xo0]]]2 Get the network stateobject ] $8.4 do 4 |k V 4%N'.  4%N' Ma P 4%N'le no]D@30.0 4!.e ! Ensure we have a valid structure ------|k]` 4!T.x--] 4!L. D x put |k]]# Get the User preferences for drop.(@0@ Note, we should probably have a COM enum for the drop referencexC location (Crown, Centerline, Invert) although thats hardcoding thenot usG the enum values for this rule, it would be beneficial for readability.  x%`'X$8  %`'R Rule spec states that any activity for this rule is for junction structures only.R I've added the kStruct* enum values above for reference but anything here forward] should be junction structure only. TODO: Expose PartType Enum in COM => kStructJunction=102 ! f|k, Ensure we have at least two connected pipesadjust/ If we have one pipe, theres no in\out conflict] !$'"@8 If we are in layout mode and we have one pipe connecteds = then setup a param for the Cover and Slope rule to use latercept 4!Hlookup] 4!>.&t &e need F Not sure how to check if object is something in VB, so this is empty.!LdpOuterDiameterOrWidth &!f !TB@(!LastPipeWallThickness &!h !TB@(   !LB@(R  X !TB@(kk% If we don't have 2 or more connected dro pipes right now, bail " ing N If we have one pipe connected, we may be at the end of a rule sequence and we . might need to drop the sump of the structure. We're done|k( Now collect the array of outgoing pipes and array of incoming pipes]]H5 Warning...Connectors are 1 based and not zero based.] . "] 0       /`$rU $`$`$`$`4!` a++=,I` },q` }4`}n$ `$rU~|  a1Iqy  qIq! )0   0 X  pK l llc hl l>h1xhl l>h1thl l>h1p`l ,l`=d` ldc`l l`=\``l l`=X`l\clXc0lxF8%\ 0o0tH,lpF8%X 0l,tP,d  l,f*,d Pl,q(&l dk&)`l (l`=  ` l cz'00  m0 `d $ ` ()`00  m0 `d $ ` ()`&oPlp`d  ` ()`%mHlx`d $ ` ()`l(<l(ci&kd xk&p &kd tk&p k  `kd Tl`= `:8 ` ^ qlql @ lllk ] `kd Tl`= `:8 ` ^ qlql @ lll dO:8 ` ^ q:8 ` ^ qll  t  t  PH  d 8dL l\d xXSepth`K l llc hl l>h1xhl l>h1thl l>h1p`l ,l`=d` ldc`l l`=\` l\c`l l`=X`l\clXc(lxF0%\ 0o(tH(ltF0%\ 0o(t@$lpF0%X 0l$tP$d  l$f{hl l>h1 l ltl 0$d Pl$qllckd xkp kd tkp k Q `kd Tl`= `:0 ` ^ qlql @ lllk  `kd Tl`= `:0 ` ^ qlql @ lll d:0 ` ^ q:0 ` ^ qll  t  t oot oo@}hl l>h1lltl 0mltl <gdL l\der xXn\pth`0   0 X   0 0   0    Hp 0 o0o)p rU $`$`$`$`L!`!9i===I#@I` !9==#8q`!9==n 0p 0 o0otpmpt<jxqnx#]/ Is this pipe going in or out of the structure? . %4'2 . %6'0/ Add a pipe to the flowing in array if incoming 2] . %:.8] *$>'< < '< <*  8 <2*k 0 Add a pipe to the flowing out array if outgoing 0]( . %:.@]H ,$>'B B 'B B,x @ B2,k . Check our in\out pipe counts]] *$>'D ,$>'F? If we have no pipes going in or no pipes going out, we're done D F|( k 9'''''''''''''''''''''''''''''''''''''''''''''''''''''''''9 If we're here then we need to analyze our incoming pipes9 versus our outgoing pipes. All incoming pipes should be- higher in elevation than our outgoing pipes.8 Specifically, our lowest incoming pipe should be higher7 than our highest outgoing pipe. Any movement of pipes7 should be pushed DOWN and not up so that our structure9 does not resize above ground. Any pushing of pipes down7 should still seperate the neighboring pipe by the Drop Value provided by the user.]]] ,$N'H *$P'J *$R.L Drop the out going pipes X  LA@T) Last thing to do is resize the structure based on new Pipe elevations B@23RecordError Err.Number, Err.Description, Err.Sourceo]@]X]p2` Get the network stateobject]$8.4 4|k V 4%N'  4%N' P 4%N']D 4!.! Ensure we have a valid structure |XkP] 4!T.x x| k2 ParamsLong has the Drop Reference Location value.] 4!L. x |k]] ]8@ Note, we should probably have a COM enum for the drop referenceC location (Crown, Centerline, Invert) although thats hardcoding theG the enum values for this rule, it would be beneficial for readability.  x%`'X  x%`'X  %`'R Rule spec states that any activity for this rule is for junction structures only.R I've added the kStruct* enum values above for reference but anything here forward\ should be junction structure only. TODO: Expose PartType Enum in COM => kStructJunction=102 ! f]P \ 4%N'Z  Z 4B@|k, Ensure we have at least two connected pipes/ If we have one pipe, theres no in\out conflict]h !$'" " |Hk@( Now collect the array of outgoing pipes and array of incoming pipes]]5 Warning...Connectors are 1 based and not zero based.] . "]]0/ Is this pipe going in or out of the structure? . %4'2 . %6'0/ Add a pipe to the flowing in array if incoming 2]H . %:.8]h *$>'< < '< <* 8 <2*k@0 Add a pipe to the flowing out array if outgoing 0] . %:.@] ,$>'B B 'B B, @ B2,k . Check our in\out pipe counts]] *$>'D ,$>'F? If we have no pipes going in or no pipes going out, we're done D F|kL For validation, we need to be sure that our highest outgoing pipe elevationL plus the maximum drop value is less than the lowest incoming pipe elevation](]@ ,$N'H *$P'J]X J H '^ Violation? ^ X ]p b 4%N'`  ` 4B@  ^ 4B@k02(3RecordError Err.Number, Err.Description, Err.Sourceo2 Get the network stateobject]0$8.4 4|xkp]DP 4!. Ensure we have something |k h|k]p !$'"> Warning...Connectors appear to be 1 based and not zero based.] . " . %6 7 Warning...pipe accessors are zero based not one based!] . %:.j : Check to make sure we are starting at equal ending points # before adjusting drop preferences.] j!'l l  h!! j!(d@ h!! j!(k  B Now, depending on the drop preference (crown, centerline, invert) I we may need to adjust the drop value amount. We determined the violation F based on Z so that would be the centerline. If the user chose invert N or crown, we adjust the drop value by adding or subtracting half the diameter # or width (depending on pipe type). CROWN = 0 CENTERLINE = 1 INVERT = 2] fX'n  CROWN nA Calculate the inner radius of the last pipe made before this one] h$p'b! Calculate radius of current pipe] j$p'd& Get elevation of previous pipes crown]( l  h!! b 'rd( h!! b 'rk3 Match our outgoing pipes crown to the previous one+ Start with the centerline and push it down l  r j!(dh r j!(kP% Match Crown and subtract drop amount l  j!! d d j!(d j!! d d j!(kk CENTERLINE n9 We already did this early in this method but do it again' in case any changes occur to this code l  h!! d j!(d h!! d j!(kk INVERT n+ Get elevation of previous pipes crown then4 Match our outgoing pipes invert to the previous one+ Start with the centerline and push it down]@ l  h!! h$p 't t j!(d h!! h$p 't t j!(kP& Match Invert and subtract drop amount l  j!! j$p d j!(d j!! j$p d j!(kk < Now set the end point to the same if the endpoint is higher . and let the network state know the last point l  j!! j!! j!! j!(kd j!! j!! j!! j!(kkx - Set the last pipe elevation on network state l  j!! 4(jd j!! 4(jkk .2oX 2] ] . v v] .$v.: : / First time through? Then set dHighestDouble to 3 the first value. Otherwise, check against previous 5 value to see if we need to change the dHighestDouble  to one even higher. . v :!!'x :!! x e :!!'xk8k0( x'N23RecordError Err.Number, Err.Description, Err.Sourcei0 2] ] . v v] .$v.: : . First time through? Then set dLowestDouble to 3 the first value. Otherwise, check against previous 4 value to see if we need to change the dLowestDouble  to one even lower. . v :!!'z :!! z e :!!'zk@k80 z'P2 3RecordError Err.Number, Err.Description, Err.Sourcei  2 ] ] ] .| . v v] .$v.: : . v :.| :!! |!! e :.|k k |.Rz 2 .Ri ]Attribute VB_Name = "StructureDrop" '(C) Copyright 2004 by Autodesk, In c.LBy using this cD, you are ag(ree6oranty m res&cAs below! supp8@docuuBgDAUTODESK PROVI@ THISAGRAM "AS IS" AND WITH ALL FAULTSB[ESPECIFICY DIS@CLAIMS Y IMPLIEARRANTY OF"MERCHAABILIR FITNESS FOR A PARTICULAR USE. E*NCDOES NOT WC @.ATE OPERATION'73WI/BEUNINTERRUPT&@@0FREEAse, duplicL,disclosAU.S. G@rnsubj to_kB3F@52.227-19 (CommercialmprSE_- R?R!s)!B D2 7013(c)(1)(iiAi(C Technl Datab` ), {"pble`! OpBwExi`V *?! o& : j Descri$: EJnc d rule eaapipe# Pars:  Type/BDefault Valu߂hD Ae-8W aԇ uD c`0.5!s`pecif!B"amou$" a?# E&vA&sb1in^ pf/ PrivaCt c_dA= #I\out¯ad @!:c`e` @$ic SubG_GetG (0;E_PROB%S _A=yR'P) QDim sA%As rcMaximu mOg,ReferenceLoS  On Err0GoTo eH@nleOQc' p"net work 0teNoBV# oNStqAecc9SP=If Is N{ Thenc ExitQa\IfS=;.]ource(STR_DROP_VALUEp!!s>le_MAXIMUM?B oo REFERENCE_LOCrw c6(|s SrWCur%tL'0W"ywe haɰa >idp"so0odS b7sDo9 P]yr  ?Lo$-gQN/PfsSSQ Or ob//L/sqRU& H3GAUser pr%G^qf':e, !shouldobably"COM en|uma1RjlL(Cr , CA0erlinInvertl@Dugatsrd0ٱB1(iS, PDw be benefiRfRreadability 3.R(G9B^:>' L ~Ys[n`ːv 2pf junfnl ' I'=dd`qk<*a"Vxanyp3hh? yc! @? o! Oxpo@}Pt"E"q#P => $ J =8102SShGƶre.PartType <> 102 Then  Exit SubDEnd If,' Ensure we have at least two connected pipesdIf\one, theres no in\out1 !iI*o~2= GetA2Size(.\+ 1KReB 4B*6j.d > IAoe eQ+s@vut-u'Q Е! Qq RP2i*s<;6(  )5-2@N`ext i' CourLcq"4t D),6OI} sXLvp- 0 Or5 0;  '''_3 nn4analyze'` Q{' psussjb. AllY shouldh0àǠmelevPansZz' SpecificЮy@p&eeZ thDb`C ny mpmwR v push@DOWN"soa p Fdot ` abp gr1>daq dowT'5 stiseper`e neborq byr provid r~dHstA W;dLow`I/ o 5Cҟ?ze= GetHighestPipeElevationByStartPoint(ouAps) dLowIncoming & Endin2`Set o`&CCIn EBy<' Drop the gg ps %#~FlowOut dValue,Refere@nceLoc,Q)' Last<to do is resizeGstructure' based on new G eV$oS.R'ByADepth errorHa@ndler:1R@ecordE .Number,DescripSourc N [ Sub PubliZcA #AL_LidateRule( Dim sqFT AsA @FHMaximum A'bOn5or GoTo IC C'cnetw@ork st@/o`bject.o&NCteAecc ­ IGD If I@s NothThenC Exit`AcIfCCHW=.b@sk(STR_DROP_VALUEs`dMAXIM u EA'ue.("@akCBsyOr oxA28߁UѠ ' Rshould probablyTCOM enuXm f@dr l (Crown, Cen@terlin Invert) a$lt@ghatsrdcod1J11uest1o`, Kw be benef icialRreadability!.y(7O4AdLe}J"t5W specSe1at any activk!qjunFsl' I'HddqkG*qabo@V nbfhward $@?# TODO: E xpose?tTypePR&in Qq'=>  J =x102#S9R.C<>  o5p`qi@#3(8-=_pe_p_RULE_APPLIES_TO_JUNCQf_ r UCTUR`ONLY{.PI`MsgOnd t,1ci }}_ht lewo conn @"fFkoneb,Y@ nn\1^fĎ# !l!XsCountgU@gCepq< 2Ndowll array oTut'6d'i/4()Ehs  A! pWarn)...ors e 1$0t zerVo#qi!IXgTerF`\iH1~ Ь8Sq bqO>tBoo" g#J[=PA#qG07}3?b(I %*In(i6 %ں ` ' Ad` "0 kر f @ #$if? + IUo C#1=3(i -| 1 !i~I92rA2S(%̶ipeCount + 1  hReDim inPs(1 To iI4|) ZSetV L = oIn ` End If ' Add a p to the flowing out ar@ray if goDIf bF4O0The DrPAs Aec~cX$oiStructure.Connected(i - 1$5:PLong i = GetAvSize(}s 4E| ! BDut!(J)|@ 5G|CNexF ' Checjkzr\@*cAsCX XD9_C^/C iC' we have n2oB0s 5 or @, 're doneCC *0 OrAd/0 Exit 8SubC0#' Fvalidation needobe s`^ pat r highesatcu0elevE plusbwmaximum drop  ue is lesanb uA incom|Q  yA9dHC`M#=D0oublD%bLow@ I% L  9 !*EByStPartPtMqdL cl@/#+J("AalD@%Val %d= -  ' Vhiol5?# J(a > dM6F)Jwx!.strErrorMsgojNetwork*te.RuleResource(STR_MAXIMUM_DROP_EXCEEDEDHoOnCu@rrentP`6 sM,  cJ_ '# me#Handler:'Record" .Number,bDescrlipcrSB$# Sz P_ic| !6NsA@0Out(dAA&m2&%, bPrefecea3,|ToGuideFromer #Ona CGoi 'Al">nateobjs##  6(!-Is Noth`?R?RR ) 5 S W}.T)L' EnVbsome   a80^Ug!(Al&g%W ۓsC"Warn..eors appearh1 basi`4st zhero#.S iaIntegerSni as.I X5igQ'' 7 rmaccor ~ ~ ![(O(q[(U/ 5ǫmak$*:a sq5equal endprTe' befoPadjustapVHsde0 Dir$E0 4~.Ez`!aYTo2soEB.Z59."{Els fm.gl'Uwd4epTo#\ (Pcrowc`ye@rline,ЯvXert[U 'm? "BdB3aml. W@eterpv sC1 Z sq*wo8uld ) . 1user chosPn Mo 0B- by ad1subtrac/halfm $#I<9cu>rr9 OM5Cu>r#!5 4OutA2D ele@vationlp`reviools crowЅ/EToMatch0e@'FlowDiraec&c*Dec!EndToStartSؤ= Mt.Point.Z + gElsA#I.! g@8 If5' c0our outggo8 torf8sp! ?'KO#2O# {}'ю}}% #ddinveyd$`b d1)dO as ,,,b0Mȥ;O-Ϩ33_Q2B@ Bx_ }5_ o9=K%}BH6xI,!xx ?P@ _2Px0^T) _Qzq+*/O#[?T' Now sertK e1sampnPhigh'lnetwork st쐴know the last point  4If eOutFlowDir = aeccPipe"ectionEndToStart Then [op.'Px.Z > DDHE=Ea If Else`T_k`"_"B` `' Sets elevaAr on network statLBKD? oN>te.LE$`wl(]WQLNext i errorHandler:#SubPublic Fun GetHighes>CBy+@(arrayKs() As A9Do@Dp"On E! GoTo Dim dDcA !iInteger For i LBound() `Uc&' oa eX' i)G`SNot Is hingga' Fir! timedrough? sfY"toAf"value. O rwise, check againarevious- to e if we red!chang-e3oye @even haHr.K%56ҹ ta5* s 1.@^/ǿL Zlndn'nes#o>t[  |BJRe0cordo.N@umber,Aq.DescripaSourcvtLowOb,lB JB 9dsAA#ALAis8==8OA(AA(gAAZA@ AAA' AAAy EonA^eA5Ay>sA@!A).]:ЖAZ < { HFp_A_AtCx06!A_.a 'AApyA @' By O@Yu ?o@8o@oz o ~B<=5|SDDDA?rφ0,φφS "pwpes5?*BPKv0ޠ< Ix5 )4pv *4 Exitv.#Uw /1 ?U 5v3$8.4 4 |k V 4%N'   4%N' P 4%N' ]D 4!.! Ensure we have a valid structure  |XkP] 4!T.x x | k2 ParamsLong has the Drop Reference Location value.] 4!L. x  |k]] ]8@ Note, we should probably<kqn&xME| @060< B0n z ~(> PLPLPL LLPLPLLPL"LL< 8$ E(P0 E*8 E(@MbX?(@ ,` 9 .` = 0x`@ kmm@ 5xh inc% ;ts on% Al for%`Fj e Ag`X,t th`ZP(`\ `^`b`d mp % vX`krr 5x% ;t% yl% }h0%```X`P`H`D`<`8`4``on, ` U.S`(ect t` )5re -%);-701%)mhnic %i ppli xHJ *% |h****% @****% ****%`****`**** ****%`****`****`: Co``: Cr`-sec`n of`J `ompo`ed s`igin@ is` por` ` rame` Ty` faul` on` --`---- r0 `xk  )5 @H %);hpce S%i m Sl yx % Apane% Hlred %`d.0 `Tarse P8 Mi`%`D `<pe o`4V ` ,m Co`$ ` ope ` `----`----` ---- `lkp )5 Mb%); %  xE"E&(( E  xXP0 ( %8PJVRrt@ p @h @ d (@MbX?X@(Xp H 0 @ ` see@( \ e ha@@ X op r@X T , t@p P pro@ L @ H @@ D @ @ @ < t ha@8 meth@4 rows@ if w@ hat @` need@ p lo@ ng t  X  @ p p xH0@t @\ @L *@ @ @ p `x@x @t @l P8@hxP 8@hp @@ @$ @ @ @ @8 `@ @ @ @ @ @ @ @ `@  0 P 8 2mG*\R6*#9d*\R6*#6b*\R5*#305$*\Rffff*0A48bdb96a*\R6*#69*\R6*#92*\R6*#8e*\R6*#14$*\Rffff*0<48bdb965*\R6*#61*\R6*#61*\R6*#4a*\R6*#4a*\R6*#4b*\R6*#49$*\Rffff*0=48bdb965*\R5*#2b9*\R5*#2bb*\R5*#196*\R5*#2d2*\R5*#2bb*\R5*#0*\R6*#4b*\R5*#2a5*\R0*#f*\R0*#13*\R0*#19*\R0*#e$*\Rffff*0>48bdb965*\R1*#17a*\R1*#1949 * 0 8 8@ <x 4 : >0 :p B @ 48 >p   B > FX @ "  J B` D F 8 P@ P P $0 X R` P > H P VX T d Xp X \ \  R *@ p      " ( 0 " P X "` h "p        &      X( Z X 28 p x      H H 4H      ( 0 8 L@ X  9 9 *'( ,'X H    (    &*( &P x     . 6 4H *    6 B   h         (8HP h p >x  "   "    (0   &8 ` hx    *   * (08  0H x &      $ $@`x  V  "    80H `x "   8  8Ph  p D55   8 @ Xp d  "     *  (  *8 hpx  .    <^D{ѕzyL$jq#!X1uK2x!X1uK2^D{ME(SLSS6"N0{7AABBB95-79BE-4C0F-8024-EB6AF271231C} (%H` % %`h8@02mG$*\Rffff*0>48bdb9654xAttribute VB_Name = "ThisDrawing" Bas0{7AABBB95-79BE-4C0F-8024-EB6AF271231C} |@GlobalSpacFalse dCreatablPredeHclaIdTru BExposeTemplateDerivBustomizD2lPredeHclaIdTru BExposeTemplateDerietSumpDepth lp= p lc3+htx  J+htx P4xltHd\TL@4p`XPHD<8(K x lxc px (lp=tp ltcJpx lp= lppx lp=hp@x l>@1    40 hp x  ,    0  (0 8@ X` x    08  8@ Dx B     F( ,p    &  (   ((  P X  ` p   x   &    (   (! 8! @! H!X! `!  "h! !  .! &! ! " "(" 0"H"P"  4X" " *"*" #  $# 8#@#  H# &X# # &##   (# ##  #$ $ $ $ ($ 8$ X$`$ p$x$   ,$  $  $ $ $  "$  %&0% X%&h%%  % Z% $&$(&  P&  X& 0x& && & &&  N& L0' $' '  '' ''(  ( (( 0( @(P(  X( h(x( (( ( " ( (  *( (()  .) @)H)P) `)h)  x) )) )  4) )) *  ,* @*H* P*  0`* ****** ** ** ++  +(+ " @+$H+$h+++ ++   +  8+ D, BP, , ,%1 N21   2 1(5,  ,  ,(5-  (-,   B0- x- -  - - - -- -   .- &. 0. 8. 5H.`. 5h... $. . . . &>. / &>/8/@/   NH/ L/ $/  0   0 @0 H0 X0h0  p0 00  0 :0 0 " 0 0 0&1 1&01H1 P1 :X1 1 82$(C) Copyright 2004 by Autodesk, Inc.1By using this code, you are agreeing to the terms5and conditions of the License Agreement that appeared.and was accepted upon download or installation4(or in connection with the download or installation)8of the Autodesk software in which this code is included.4All permissions on use of this code are as set forth;in such License Agreement provided that the above copyright:notice appears in all authorized copies and that both that-copyright notice and the limited warranty and7restricted rights notice below appear in all supportingdocumentation.;AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.7AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF@MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.:DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BEUNINTERRUPTED OR ERROR FREE.DUse, duplication, or disclosure by the U.S. Government is subject to<restrictions set forth in FAR 52.227-19 (Commercial Computer=Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)@(Rights in Technical Data and Computer Software), as applicable.J *************************************************************************J *************************************************************************J ************************************************************************* Name: CoverAndSlopeL Description: Creates a simple cross-sectional representation of a networkJ lane composed of a single closed shape. Attachment origin7 is at top, most inside portion of lane.P Parameters: Name Type Optional Default Value DescriptionN --------------------------------------------------------------^ Minimum Slope double no 0.05 specifies side to place SA onQ Maximum Slope double no 1.0 width of laneR Preferred Slope double no 10.0 depth of coarseU Minimum Cover double no 4.0 slope of the lane.V Maximum Cover double no 30.0 slope of the lane.K --------------------------------------------------------------------------$ Default values for input parameters]D(@ ]DMbX? ]D(@]D(@ ]DMbX?(]DXP Called but not used hereo Called but not used hereo2 Get the network stateobject]P$8.4 4|0k( get the current pipe to work on]Dp 4!>.:R Check if we are in layout mode. If so, we need to see if the structure drop ruleS exists on the connecting structure, and honor its drop preference. All this boilsR down to is to see if the network state has params from the drop rule, then adjust, the LastPipeElevation property accordingly.] :!D.@] @'F 4!H FB The maps don't have a "contains key" method, but rather it throwsB an exception if we lookup something that doesn't exist so we need- to do key loop lookups before accessing them   & @!L P 4%N$J @!T V 4%N$R @!TOuterDiameterOrWidth$R @!TLastPipeWallThickness$R]]]] F Now that we have a drop reference and drop value, calculate where the Q starting position of this pipe should be and set the LastPipeElevation property. P 4%N @!L%`'Z V 4%N @!T%`'XOuterDiameterOrWidth @!T%`'\LastPipeWallThickness @!T%`'^ A Calculate the inner radius of the last pipe made before this one]( \ ^ 'b ! Calculate radius of current pipe]@ :!f :!h 'd Drop Reference Location values:  Match Crown 0  Match Centerline 1  Match Invert 2 Z! Crown' Add the inner radius of the last pipe./ Subtract the inner radius of the current pipe.. Only matters when last pipe and this new pipe$ have different sizes during layout. 4!j b 4(j 4!j d 4(jk 0 If its centerline, just subtract the drop value < from the LastPipeElevation property since its CL by default Z! Centerline 4!j X 4(jkX Z! Invert 4!j b 4(j 4!j d 4(jk k k ]X :!p.l l 4 :A@rd 4 : lA@tk 2 7 RecordError Err.Number, Err.Description, Err.Sourceo@ x20  Get the network stateobject]$8.4 4| k  get the current pipe to work on]D 4!>.: :|` kX #Get the double parameter collection] 4!T.x#Get the double parameter collection] 4!.|) Now get the parameter value for the rule]8]P]h]]  4%N']  4%N']  4%N']  4%N'  x%`Y@'  x%`Y@'  x%`'  x%`'P Vars aren't scoped in VB so we will declare the one and only errMsg string here] Check minimum cover of pipe] :!' #.00$X'   4B@  $  4%N'   4B@kP Check maximum cover of pipe]( :!' #.00$X'   4B@  $  4%N'   4B@k Slope]@ :!#.0000$X' #.0000$' #.0000$'  d 4B@  $  4%N'   4B@k  d 4B@  $  4%N'   4B@kX2P ! ! !A@o(X2#Get the double parameter collection]0 4!T.x#Get the double parameter collection]P 4!.|' Get the starting and ending structures]p :!D.@] :!. Get the pipes length] :!'- Get the last elevation from the state object] 4!j'% Get the flow direction from the pipe] :!') Now get the parameter value for the rule]]]0]H]`]x  4%N']  4%N']  4%N']  4%N'  x%`'  x%`'   x%`Y@'  x%`Y@' 'k2 If the last elevation is equal to our double max,> then the last elevation has not been set in the network state< and we will set the starting elevation to the minimum cover]]  @ If the network state has a last picked' elevation, start there.% Otherwise, take the min cover route.  * :!! :!! l%'   '  :!f?  :!( :! $ :!!  :! :!(kd  :!(k  e  * :!! :!! l%'   '  :!f?  :!( :! $ :!!  :! :!(kd  :!(kk Set the last pipe elevation 4 :A@( If we are cover only, set the other end of the pipe to the same Z value    :!! :!(d :!! :!(kk. Check the min cover. Adjust if still illegal :! $ :!!  :!  :!( :!!  :!  :!(k Now set the slope on the pipe    :!!   :!(  e :!!   :!(k@" Now let's check the minimum cover]] ]8]DP]h]]D     :%']{Gz?'] '& Loop until we can correct the problem b  increment our slope value   '  $  $   :!!   :!(  e :!!   :!(khd`S We've reached max slope so lets just bring down the pipe a little bit on both ends :!!? :!( :!!? :!(k     :%' ) Stop at 99 percent. Something is wrong. Gz?x8k0(k G Set the last elevation on the state in case we have no structure rulesF or surface, then we can calculate we the next pipe should go. this is important for NULL structures   :!! 4(j  e :!! 4(jk Now resize the structures @ @B@k  B@k2x ! ! !A@oP2@#Get the double parameter collection] 4!T.x' Get the starting and ending structures] :!D.@] :!. Get the pipes length] :!'- Get the last elevation from the state object] 4!j'% Get the flow direction from the pipe] :!') Now get the parameter value for the rule]@ ]X ]p ] ] ]  4%N']  4%N']  4%N']  4%N'   x%`Y@'  x%`Y@' 'kh  x%`'  x%`'] 2 If the last elevation is equal to our double max,> then the last elevation has not been set in the network state< and we will set the starting elevation to the minimum cover  *k  :!f?  :!(  e   '  :!f?  :!(k; otherwise set the starting elevation to the last elevationdX    :!(  e  :!(kk( If we are cover only, set the other end of the pipe to the same Z value    :!! :!(dx :!! :!(kXkP Now set the slope on the pipe    :!!   :!(  e :!!   :!(kkG Set the last elevation on the state in case we have no structure rulesF or surface, then we can calculate we the next pipe should go. this is important for NULL structures 4 :A@ Now resize the structures @ @B@kp  B@kH2@3RecordError Err.Number, Err.Description, Err.Sourceo0 2 :!  :!! 4(j :! e :!! 4(jk23RecordError Err.Number, Err.Description, Err.Sourceo@   ' :!!vbCr 1Surface not found, enter invert elevation to use: !%'  (2ڸAttribute VB_Name = "CoverAndSlope" '(C) Copyright 2004 by Autodesk, In c.LBy using this cD, you are ag(ree6oranty m rescA s below! supp8@docuuBgDAUTODESK PROVI@ THISAGRAM "AS IS" AND WITH ALL FAULTSB[ESPECIFICY DISCLAIMS Y I MPLIEARRANTY OFA"MERCHABILIR FITNESS FOR A PARTICULAR USE. E*NCDOES `NOT WC@.ATE OPERATION7I3WI/BEUNINTERRU'Parcs: TxypeC`Default Valu#D Ae-8 Mini0mum douX `E 0.05spec if!to place SA "o(Max 1.0 wid+O Preferrc O 1P HdxhamcoarseO ⅐O 4 srg' H3  Q --':v's}P. N pv, Priv@:<Њ c_d= 12#d0A0.667/d6Cpt9ax"DBL_MAX1.79E+308CpP$AAd her!P`0ic Sub`XL_GetIn>(pcE0#___Outog _AgyRul&eq!% QOn ErrGoTDo 2orHlePr' T teox$c@Dim oNCWSt As Aecc9S@=a{ IfIs NaThe E 1ExitIf' g3qcuB0pi@WPJcJ[ar P   r= .CCheck if Nw@@latcdAgso,ne`'P see# Puctdr0op rex(istpnco>n06`"ho>nĠ"s`Renco"boil@bpQ*! h@A BrombV ,n adjus LasbtQEleC ơccord0ly0S! &rtStrߓ.k#SbInvidBoolea&g* --.IsIn M !. o /!'  mapsQn'tv0& " ta@ ke y" med,r Lra Qr owan ex!1*look 0+cAdd"S#Subtrac>2Only matUsn1aYthTnew#0\difb\t sizes duyout _o+S/7Z@BN+ 6p<1 *{%-T// EIf;' `$ its c(, xjus@i7rfrom$/ %nvQCL by default-1-V ?W0>t $ 2 < !!'pe ]'oomK.'3?]V`oS0urfa𙐦AeccS0 =.sfIss`Eng ApplyWitPt4, FhalsE&Forp erroDrHPlere'qRecordE P.Number,DescripSoҙ P[ "Pic CoeSlope2_`/id ()aOnor GoTo QX' GPnS+ `teobject>'YUA~19=aq ?o0Exit!sSS' g im tor  od " e  -7 5a o Q 0o K^S'do1 pq coll ̔cC yc  ? \ double parameter collection 'Dim oPsBool As AeccPipe*TSet T= oNetworkState. ^5' Now g;th value for prule/dMinimumSlopeD ax Covm ET@strMaxdString RResource(STR_MAXIMUM_SLOPE)#s(inINaxFO55`COVER5in5CR 0).VA(HZ) / 100#   Y+ WIAIf (FuzzyLessThan( , dMax_) Or B EqualTo ) Then!O&eFlowDiraeccDfionEndToStart8 `Br.ZFc E-  * d@Lengthp^E(lse?nTo >Ew?+*a|If*a ' We've reachmaxAUso lejust bring downe a littAcit on both endskϡ /6"1#0*H- 1k  {(dinC){' Stat 99 perc . SomethA6is wrong.K@[nN>yExQZobjp4cLLp p_JPsS f dic !c $1XS?sOg10cgrpj'c$ 8r=mV%= 3¦ .5=R [N3(STR_MAXIMUM_SLOPEHa inpe As String strMinSlo= oNetworkState.RuleRe@source(STR_MINIMUM_SLOP E) Dim axCover'%kAXkCOVERkink,׉5zIf Not bCOnly Then dimumParamsDouble.Value() / 100# ax! ax1 Preferred $CEnd IfC? X@Q.BgdMC+] DD JdNewPipe.ZM '- the last elevation is equ@al to @ d[ max, 'A nhas nAteen set i nǀ@aMwe wi ll "start؈#@!AminyAr cDŽ@d L0EF0= c_DBL_MAXL oD.rtPoint.Z =\ 0 BO=@i sDraw@.Utility.GetReal(vbCrLf & "SurfaceB found, entyinzi,use:"h88!aeFlowDir@aecc3A$ec5ToO!PKgeg@= g- *T(E$(  #OuDiameOrWidth * 0.5  Else?n@ToP2G` G@ ,[偡 ' o[rwise`,u$, .nHc%B%+nC d\Qp`` Tx l>TLQXPP  C@@QHDD  C44Q<88 2\L@4)`PD89dx l>dF%pl p 0 lq(p59dx l>dF%pl $p 0 ot,p5': %pl $p 0 ot p': %pl $p 0 otpo o볯t*t t oo볯tl(|x Too9x Xx Too9x Xl(x Too,9x Xl(x Too9x Xx Too9x Xpt lp= p lc3+htx  J+htx P4xltHd\TL@4p`XPHD<8(K x lxc px (lp=tp ltcJpx lp= lppx lp=hp@x l>@1D@x l>@1<@x l>@18@x l>@14$l@1ll4x 0t ot8:NHM$@ HtH6ml8x <H v@x l>@1ll8x 0Dt :Nok Ht65:N`M$@ Bt`65:NXM$@ BtX6od9lDx <X q@x l>@1llDx 0od9l<x <` @ x l>@1ll<x 0d !pp "@ ! ," ! $">Ǥ>@ǨlY # 2)p(H0 xl4D8h<t4 @p0 X  TKNtH lt= xttH llt=pttH plt=lt\H do\td\H To\tTLH XlLqPH l>1 H l>1H l>1H l>1 <$\lF%x 0 o\Y@tD$\l F%x 0 o\Y@t<oDt$\lF%x 0 o\t4\lF%x 0 o\t,oTX%\tH ,t 0o\t~2\$%*F%t&$' (t 8)o\tt5lP- oo4t5\H oo\?9tH ,t ,t|lP| oo4t5\H oo\?9tH 0t ,tlPmTtH ,t ,tlPmTtH 0t ,telP,5\tH ,t 0m\H 0 ,)tc5\tH 0t 0m\H , ,)t  lP>\tH ,t 0o\o$od9H 0 ,)t lP >\tH 0t 0o\o$od9H , ,)t ll  lpc3 p 8 llcL l 8rT@(px ltKxH XlxI&ltH 0t 0mlH XtxH Xlx&ltH ,t 0mlH Xt $ tMpipe should be and set the LastPipeElevation property. P 4%N @!L%`'Z V 4%N @!T%`'XOuterDiameterOrWidth @!T%`'\ 𭺶LastPipeWallThickness @!T%`'^ A Calculate the inner radius of the last pipe made before this one]( \ ^ 'b ! Calculate radius of current pipe]@ :!f :!h 'd Drop Reference Location values:  Match Crown 0  Match Centerline 1  Match Invert 2 Z! Crown' Add the inner radius of the last pipe./ Subtract the inner radius of the current pipe.. Only matters when last pipe and this new pipe $ have different sizes during layout. 4!j b 4(j 4!j d 4(jk 0 If its centerline, just subtract the drop value < from the LastPipeElevation property since its CL by default Z! Centerline 4!j X 4(jkX Z! Invert 4!j b 4(j 4!j d 4(jk k k ]X :!p.l l 4 :A@rd 4 : lA@t k 2 7 RecordError Err.Number, Err.Description, Err.Sourceo@ x20  Get the network stateobject ]$8.4 4 | k  get the current pipe to work on]D 4!>.: : |` kX #Get the double parameter collection ] 4!T.x#Get the double parameter collection ] 4!.|) Now get the parameter value for the rule]8]P]h]]  4%N' ]  4%N' ]  4%N' ]  4%N'  x%`Y@'  x%`Y@'  x%`'  x%`' P Vars aren't scoped in VB so we will declare the one and only errMsg string here] Check minimum cover of pipe ] :!' #.00$X'   4B@  $  4%N'   4B@ kP Check maximum cover of pipe ]( :!' #.00$X'   4B@  $  4%N'   4B@ k Slope ]@ :!#.0000$X' #.0000$' #.0000$'  d 4B@  $  4%N'   4B@ k  d 4B@  $  4%N'   4B@ kX2P ! ! !A@o(X2#Get the double parameter collection ]0 4!T.x#Get the double parameter collection ]P 4!.|' Get the starting and ending structures]p :!D.@] :!. Get the pipes length ] :!' - Get the last elevation from the state object ] 4!j' % Get the flow direction from the pipe ] :!' ) Now get the parameter value for the rule]]]0]H]`]x  4%N' ]  4%N' ]  4%N' ]  4%N'  x%`'  x%`'   x%`Y@'  x%`Y@' 'k2 If the last elevation is equal to our double max,> then the last elevation has not been set in the network state < and we will set the starting elevation to the minimum cover ]]   @ If the network state has a last picked' elevation, start there.% Otherwise, take the min cover route.  * :!! :!! l%'   '  :!f?  :!( :! $ :!!  :! :!(kd  :!(k  e  * :!! :!! l%'   '  :!f?  :!( :! $ :!!  :! :!(kd  :!(kk Set the last pipe elevation 4 :A@( If we are cover only, set the other end of the pipe to the same Z value    :!! :!(d :!! :!(kk. Check the min cover. Adjust if still illegal :! $ :!!  :!  :!( :!!  :!  :!( k Now set the slope on the pipe     :!!   :!(  e :!!   :!(k@" Now let's check the minimum cover]] ]8]DP ]h]]D     :%']{Gz?'] '& Loop until we can correct the problem b  increment our slope value   '   :!!   :!(  e :!!   :!(k     :%' ) Stop at 99 percent. Something is wrong. Gz? x kkG Set the last elevation on the state in case we have no structure rulesF or surface, then we can calculate we the next pipe should go. this is  important for NULL structures    :!! 4(j  e :!! 4(j k Now resize the structures @ @B@ k  B@ kh2` ! ! !A@o82(#Get the double parameter collection ] 4!T.x' Get the starting and ending structures] :!D.@] :!. Get the pipes length ] :!' - Get the last elevation from the state object ] 4!j' % Get the flow direction from the pipe ] :!' ) Now get the parameter value for the rule]@ ]X ]p ] ] ]  4%N' ]  4%N' ]  4%N' ]  4%N'   x%`Y@'  x%`Y@' 'kP  x%`'  x%`' ] 2 If the last elevation is equal to our double max,> then the last elevation has not been set in the network state < and we will set the starting elevation to the minimum cover   * 𭺬'     '  :!f?  :!(  e   '  :!f?  :!(k; otherwise set the starting elevation to the last elevation d@    :!(  e  :!(kk( If we are cover only, set the other end of the pipe to the same Z value    :!! :!(d` :!! :!(k@k8 Now set the slope on the pipe     :!!   :!(  e :!!   :!(kkG Set the last elevation on the state in case we have no structure rulesF or surface, then we can calculate we the next pipe should go. this is  important for NULL structures 4 :A@ Now resize the structures @ @B@ kX  B@ k02(3RecordError Err.Number, Err.Description, Err.Source o0 2 :!  :!! 4(j :! e :!! 4(j kx2p3RecordError Err.Number, Err.Description, Err.Source o( d8k0  $  $ 00S We've reached max slope so lets just bring down the pipe a little bit on both ends :!!? :!( :!!? :!( 011ڸAttribute VB_Name = "CoverAndSlope" '(C) Copyright 2004 by Autodesk, In c.LBy using this cD, you are ag(ree6oranty m rescA s below! supp8@docuuBgDAUTODESK PROVI@ THISAGRAM "AS IS" AND WITH ALL FAULTSB[ESPECIFICY DISCLAIMS Y I MPLIEARRANTY OFA"MERCHABILIR FITNESS FOR A PARTICULAR USE. E*NCDOES `NOT WC@.ATE OPERATION7I3WI/BEUNINTERRU'Parcs: TxypeC`Default Valu#D Ae-8 Mini0mum douX `E 0.05spec if!to place SA "o(Max 1.0 wid+O Preferrc O 1P HdxhamcoarseO ⅐O 4 srg' H3  Q --':v's}P. N pv, Priv@:<Њ c_d= 12#d0A0.667/d6Cpt9ax"DBL_MAX1.79E+308CpP$AAd her!P`0ic Sub`XL_GetIn>(pcE0#___Outog _AgyRul&eq!% QOn ErrGoTDo 2orHlePr' T teox$c@Dim oNCWSt As Aecc9S@=a{ IfIs NaThe E 1ExitIf' g3qcuB0pi@WPJcJ[ar P   r= .CCheck if Nw@@latcdAgso,ne`'P see# Puctdr0op rex(istpnco>n06`"ho>nĠ"s`Renco"boil@bpQ*! h@A BrombV ,n adjus LasbtQEleC ơccord0ly0S! &rtStrߓ.k#SbInvidBoolea&g* --.IsIn M !. o /!'  mapsQn'tv0& " ta@ ke y" med,r Lra Qr owan ex!1*look 0+cAdd"S#Subtrac>2Only matUsn1aYthTnew#0\difb\t sizes duyout _o+S/7Z@BN+ 6p<1 *{%-T// EIf;' `$ its c(, xjus@i7rfrom$/ %nvQCL by default-1-V ?W0>t $ 2 < !!'pe ]'oomK.'3?]V`oS0urfa𙐦AeccS0 =.sfIss`Eng ApplyWitPt4, FhalsE&Forp erroDrHPlere'qRecordE P.Number,DescripSoҙ P[ "Pic CoeSlope2_`/id ()aOnor GoTo QX' GPnS+ `teobject>'YUA~19=aq ?o0Exit!sSS' g im tor  od " e  -7 5a o Q 0o K^S'do1 pq coll ̔cC yc  ? \ double parameter collection 'Dim oPsBool As AeccPipe*TSet T= oNetworkState. ^5' Now g;th value for prule/dMinimumSlopeD ax Covm ET@strMaxdString RResource(STR_MAXIMUM_SLOPE)#s(inINaxFO55`COVER5in5CR 0).VA(HZ) / 100#   Y+ WIAIf (FuzzyLessThan( , dMax_) Or B EqualTo ) Then!O&eFlowDiraeccDfionEndToStart8 `Br.ZFc E-  * d@Lengthp^E(lse?nTo >Ew?+*a|If*a ' We've reachmaxAUso lejust bring downe a littAcit on both endskϡ /6"1#0*H- 1k  {(dinC){' Stat 99 perc . SomethA6is wrong.K@[nN>yExQZobjp4cLLp p_JPsS f dic !c $1XS?sOg10cgrpj'c$ 8r=mV%= 3¦ .5=R [N3(STR_MAXIMUM_SLOPEHa in,pe As String strMinSlo= oNetworkState.RuleRe@source(STR_MINIMUM_SLOP E) Dim axCover'%kAXkCOVERkink,׉5zIf Not bCOnly Then dimumParamsDouble.Value() / 100# ax! ax1 Preferred $CEnd IfC? X@Q.BgdMC+] DD JdNewPipe.ZM '- the last elevation is equ@al to @ d[ max, 'A nhas nAteen set i nǀ@aMwe wi ll "start؈#@!AminyAr cDŽ@d L0EF0= c_DBL_MAXHC •F= 0eFlowDir = aeccAODec#{rtTo!>KU g/- A+ Ao! . Point.ZlP>\tH 0t 0o\o$od9H , ,)t ll  lpc p 8 llc l 8@(px ltKxH XlxI&ltH 0t 0mlH XtxH Xlx&ltH ,t 0mlH Xt $ tM4rU @nxAttribute VB_Name = "ThisDrawing" BrU q49\`$xhldt$<jxqnx#s22A=SrW<22A=SrWPipeCover_GetInputParametersPipeCover_GetOutputParametersPipeCover_ApplyRulePipeCover_ValidateRule S  "PipeToPipeMatch_GetInputParameters #PipeToPipeMatch_GetOutputParametersPipeToPipeMatch_ApplyRulePipeToPipeMatch_ValidateRuleSetSumpDepth_GetInputParameters  SetSumpDepth_GetOutputParametersSetSumpDepth_ApplyRuleSetSumpDepth_ValidateRule Sump DepthUllsdc}o#y yS?0:2?' 3 CrtO endvC'C "2S(! 9Z(]zI3SLs luc dwAeUy2DSQZobjp4cLLp pJPsS f diћc !c $1XP?dsOg10ҝcgqj8'­Max"inr=m dk=3 3.5=Rz [N3(STR_MAXIMUM_SLOPEHin0 'le_MIN"w  x COVER} tv 5.?3t /?tq`pk)V.VQ(h) / 100#E'`ax7 @<^D{ѕzyL$jq#!X1uK2x!X1uK2^D{ME(SLSS6"N0{7AABBB95-79BE-4C0F-8024-EB6AF271231C} (%H` % %`h8@02mG$*\Rffff*0>48bdb9654xAttribute VB_Name = "ThisDrawing" Bas0{7AABBB95-79BE-4C0F-8024-EB6AF271231C} |@GlobalSpacFalse dCreatablPredeHclaIdTru BExposeTemplateDerivBustomizD2etSumpDepth  /xpz etSumpDepth l<px ll )pxkxpz <$ 0@tt333333@tltl 6oltllt Poltltl joltllt oltlC@tlt0t ,"tlP`mTtH ,t ,"tlPmTtH 0t ,"tlP5\tH ,t 0"m\H 0 ,")t5\tH 0t 0"m\H , ,")t lPn>\tH ,t 0"o\o$od9H 0 ,")tlP>\tH 0t 0"o\o$od9H , ,")t ll # lpc p 8 llc l 8@(px ltKxH XlxI&ltH 0t 0"mlH XtxH Xlx&ltH ,t 0"mlH Xt $07 tMMfff*0?476e39574xAttribute VB_Name = "ThisDrawing" B (#OuterDiameOrWidth * 0.5@G ElsenTo nA G= ~` ?5eFl' o`Crwise_H\ ''#)nb(Ar;+U ?7O:7 / H)a@ "@uareo4 o,F.0 endofp ws`W Z va,?0?0e. "2 @a9CWX'nw'*BVADcP_qXq_oJaT)c & ,E;- (do* dLengthg+S@eG  !s# P uS' SiOo$PhtekcaE/havem!uctu`0rsor sur face,q/n  can cal8cul onext R1should go.wiimport ant fpNULLgDsUpdߠoo,Y)resizeA NQ(bIshzp.` By1 Dept>h4 ngj1xf__ D orHler:'RecordErrP.Number, DescrivpS2 SubPic m OB(JA?9Ä}On GoTo Q.p4P=88b6AP8.o%/9@/n/C@ J/SBDW_O/// h /SBDW_/// h @ lllk ] `kd Tl`= `:8 ` ^ qlql @ lll dO:8 ` ^ q:8 ` ^ qll  t  t  PH  d 8d L l\d  xX pth`K l llc hl l>h1xhl l>h1thl l>h1p`l ,l`=d` ldc`l l`=\` l\c`l l`=X`l\clXc(lxF0%\ 0o(tH(ltF0%\ 0o(t@$lpF0%X 0l$tP$d  l$f{hl l>h1 l ltl 0$d Pl$qllckd xkp kd tkp k Q `kd Tl`= `:0 ` ^ qlql @ lllk  `kd Tl`= `:0 ` ^ qlql @ lll d:0 ` ^ q:0 ` ^ qll  t  t oot oo@}hl l>h1lltl 0mltl <d L l\d  xX pth`0   0 p   0 H   0   HrU~| ) Ii  !qIq!)I0   0 X  pK l llc hl l>h1xhl l>h1thl l>h1p`l ,l`=d` ldc`l l`=\``l l`=X`l\clXc0lxF8%\ 0o0tH,lpF8%X 0l,tP,d  l,f*,d Pl,q(&l dk&)`l (l`=  ` l cz'00  m0 `d $ ` ()`00  m0 `d $ ` ()`&oPlp`d  ` ()`%mHlx`d $ ` ()`l(<l(ci&kd xk&p &kd tk&p k  `kd Tl`= `:8 ` ^ qlql @ lllk ] `kd Tl`= `:8 ` ^ qlql @ lll dO:8 ` ^ q:8 ` ^ qll  t  t  PH  d 8d L l\d  xX pth`K l llc hl l>h1xhl l>h1thl l>h1p`l ,l`=d` ldc`l l`=\` l\c`l l`=X`l\clXc(lxF0%\ 0o(tH(ltF0%\ 0o(t@$lpF0%X 0l$tP$d  l$f{hl l>h1 l ltl 0$d Pl$qllckd xkp kd tkp k Q `kd Tl`= `:0 ` ^ qlql @ lllk  `kd Tl`= `:0 ` ^ qlql @ lll d:0 ` ^ q:0 ` ^ qll  t  t oot oo@}hl l>h1lltl 0mltl <d L l\d  xX pth`XK x lxc px ,lp=tp ltcJ c[ht Plhqlfllcb`kft tk` pkft Tlp= \ph\ X lhqXlX5PpH , p 0mPL\ 0 L ,)pLH5PpH 0 p 0mPL\ , L ,)pL pJ kJ l t@ \ t8lX%PpH , p 0oPo@t0p%PpH 0 p 0oPo@t0plXm0p\ 0 p ,p m0p\ , p ,plXq>Pp\ 0 p 0oPo8 9L\ 0 L ,)pL>Pp\ , p 0oPo8 9L\ , L ,)pL kJ?lX5PpH , p 0mPL\ 0 L ,)pL=5PpH 0 p 0mPL\ , L ,)pL kJlX0l t PpH , p 0oPo t(pm(p\ 0 p ,p0l t PpH 0 p 0oPo t(pm(p\ , p ,plXQI\ t Pp\ 0 p 0oPo 9L\ 0 L ,)pLI\ t Pp\ , p 0oPo 9L\ , L ,)pLlX'? L\ 0 L 0Pp\ , p 0oPo )pL"5Pp\ 0 p 0mPL\ , L ,)pL? L\ , L 0Pp\ 0 p 0oPo )pL5Pp\ , p 0mPL\ 0 L ,)pLlX&Pp\ 0 p 0mPx Xp&Pp\ , p 0mPx Xp fdb\0 xt\pLK Lj cfkj ` l`ckj Lp!T\` , \ 0oTtl\%T\` 0 \ 0oTol\!T\` , \ 0oTtl\ jdf!oltt(( `\K Lj cfkj ` l`ckj Lp!T\` 0 \ 0oTtl\%T\` 0 \ 0oTol\!T\` 0 \ 0oTtl\ jdf!oltt(( `\K c= h Ln cdkn ` l`ckn Lb l`h?HPh 0 P 0T\` 0 \ 0oToH)\P l`h ndd+ lhx c= x40 xh`\PH