added Revit 2022 SDK minus except *rvt and *rfa

This commit is contained in:
Jeremy Tammik
2021-04-20 11:36:21 +02:00
parent 1133a82dc5
commit 7e327986e8
3034 changed files with 1245318 additions and 0 deletions
@@ -0,0 +1,59 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RoutingPreferenceTools")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("RoutingPreferenceTools")]
[assembly: AssemblyCopyright("Copyright © Autodesk 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9ae9453f-8610-4f2f-b70f-4dd16717014f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,335 @@
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f39\fbidi \fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}Consolas;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\f43\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\f47\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f50\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f51\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
{\f53\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f54\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f55\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f56\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
{\f57\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f58\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f380\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f381\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}
{\f383\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f384\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f387\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f388\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}
{\f430\fbidi \fmodern\fcharset238\fprq1 Consolas CE;}{\f431\fbidi \fmodern\fcharset204\fprq1 Consolas Cyr;}{\f433\fbidi \fmodern\fcharset161\fprq1 Consolas Greek;}{\f434\fbidi \fmodern\fcharset162\fprq1 Consolas Tur;}
{\f437\fbidi \fmodern\fcharset186\fprq1 Consolas Baltic;}{\f438\fbidi \fmodern\fcharset163\fprq1 Consolas (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}
{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp
\fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*
\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused
Normal Table;}}{\*\listtable{\list\listtemplateid-898873842\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698705\'02\'00);}{\levelnumbers\'01;}\rtlch\fcs1
\af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0
\ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-180\li6480\lin6480 }{\listname ;}\listid273833462}{\list\listtemplateid2065229874\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698703
\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li360\lin360 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713
\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715
\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li1800\lin1800 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703
\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713
\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715
\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li3960\lin3960 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703
\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713
\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715
\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6120\lin6120 }{\listname ;}\listid639457584}{\list\listtemplateid1715920958\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360
\levelindent0{\leveltext\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li360\lin360 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0
{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li1800\lin1800 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li3960\lin3960 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6120\lin6120 }{\listname ;}\listid2011331606}}{\*\listoverridetable{\listoverride\listid273833462\listoverridecount0\ls1}{\listoverride\listid2011331606
\listoverridecount0\ls2}{\listoverride\listid639457584\listoverridecount0\ls3}}{\*\rsidtbl \rsid266070\rsid330513\rsid2899521\rsid3083924\rsid3424609\rsid3871782\rsid4525287\rsid4669670\rsid5928478\rsid8527864\rsid8601128\rsid8811819\rsid9510120
\rsid11095090\rsid11623925\rsid11945429\rsid12129767\rsid13051175\rsid13124045\rsid13846942\rsid14811145\rsid14841303\rsid15099086\rsid16007539}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440
\mintLim0\mnaryLim1}{\info{\author Steven Mycynek}{\operator Steven Mycynek}{\creatim\yr2013\mo1\dy10\hr17\min27}{\revtim\yr2013\mo1\dy10\hr17\min28}{\version3}{\edmins17}{\nofpages2}{\nofwords657}{\nofchars3747}{\*\company Autodesk, Inc.}
{\nofcharsws4396}{\vern49255}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
\deftab420\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120
\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\ksulang1041\viewkind1\viewscale100\rsidroot3424609 {\*\fchars !"'),.:\'3b>?]`|\'7d~\'a8\'af\'b7\'bb\'92\'94\'85}{\*\lchars (.<?[\'7b\'ab\'b7\'91\'93}\fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0
\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4
\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}
{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1
\af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid4525287 \hich\af1\dbch\af31505\loch\f1 Application:}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid13051175 \hich\af1\dbch\af31505\loch\f1 RoutingPreference}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 Tools}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086
\hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 MEP\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086
\hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 2013.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086
\hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 2013.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086
\hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086
\hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086
\hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid3871782 \hich\af1\dbch\af31505\loch\f1 MEP}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 ExternalCommand}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3871782 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3871782 \hich\af1\dbch\af31505\loch\f1 Tools for routing preferences\line }{\rtlch\fcs1
\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3871782 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3871782 \hich\af1\dbch\af31505\loch\f1 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\insrsid3871782\charrsid3871782 \hich\af1\dbch\af31505\loch\f1 This sample contains three commands.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid3871782
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid3871782
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid3871782 \hich\af1\dbch\af31505\loch\f1 [}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid8527864 \hich\af1\dbch\af31505\loch\f1 Note}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\b\f1\fs20\kerning2\insrsid3871782 \hich\af1\dbch\af31505\loch\f1 ]}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid8527864 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1
all samples only work properly when created from MEP document templates\hich\af1\dbch\af31505\loch\f1 \hich\f1 , such as \'93}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid8527864\charrsid8527864 \hich\af1\dbch\af31505\loch\f1
Systems-Default.rte}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid8527864 \loch\af1\dbch\af31505\hich\f1 .\'94}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid9510120\charrsid9510120
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\ul\kerning2\insrsid9510120\charrsid9510120 \hich\af1\dbch\af31505\loch\f1 Routing Preference Analysis}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287 \line }{\rtlch\fcs1 \ab\af1\afs20
\ltrch\fcs0 \b\f1\fs20\kerning2\insrsid4525287 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 Analyze the routing preferences of a given pipe type to check for common problems.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287 \line }{\rtlch\fcs1 \ab\af1\afs20
\ltrch\fcs0 \b\f1\fs20\kerning2\insrsid4525287 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 This sample demonstrates how to use the routing preferences API t\hich\af1\dbch\af31505\loch\f1 o look at all rules and criteria for a given PipeType and check for several common problems,}{
\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4669670 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 including:
\par
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 1)\tab}}\pard \ltrpar\qj \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls1\rin0\lin720\itap0\pararsid15099086 {
\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 \hich\f1 The first rule in a group (e.g. \'93\loch\f1 \hich\f1 Elbows\'94\loch\f1 \hich\f1 ) has a range of \'93\loch\f1 \hich\f1 None.\'94
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 2)\tab}\hich\af1\dbch\af31505\loch\f1 \hich\f1 All rules in a group have a range of \'93\loch\f1 \hich\f1 None.\'94
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 3)\tab}\hich\af1\dbch\af31505\loch\f1 A preferred junction type of Tee\hich\af1\dbch\af31505\loch\f1
or Tap is set, but no fittings of that type are assigned to rules.
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 4)\tab}\hich\af1\dbch\af31505\loch\f1 A segment\hich\f1 \rquote \loch\f1
s size range is not fully covered by the sizes ranges covered by elbow, junction, or cross fittings.}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287\charrsid15099086
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid4525287
\hich\af1\dbch\af31505\loch\f1
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 Classes:
\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Plumbing}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070\charrsid14841303
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid15099086\charrsid266070
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid4525287 \hich\af1\dbch\af31505\loch\f1 Project Files:
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287 \hich\af1\dbch\af31505\loch\f1 Command.cs
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086 \hich\af1\dbch\af31505\loch\f1 Analyzer.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1
Performs all routing preference analysis and exports an XDocument with XML data reporting any warnings.}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070\charrsid15099086
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9510120 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120\charrsid3083924 \hich\af1\dbch\af31505\loch\f1 PartIdInfo}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 \af39\afs19 \ltrch\fcs0 \f39\fs19\insrsid9510120\charrsid3083924
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid266070 \hich\af1\dbch\af31505\loch\f1 Contains}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid266070\charrsid3083924
\hich\af1\dbch\af31505\loch\f1 a routing preference rule group and list of }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid266070 \hich\af1\dbch\af31505\loch\f1 E}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid266070\charrsid3083924
\hich\af1\dbch\af31505\loch\f1 lementIds that correspond to found segments and fittings that meet criteria specified through a routing preference manager.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15099086
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid4525287
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 1.\tab}}\pard \ltrpar\qj \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls2\rin0\lin360\itap0\pararsid266070 {\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 In Revit MEP, open or create a new document, load several pipe\hich\af1\dbch\af31505\loch\f1 fittings, and define several pipe segments for several pipe types.
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 2.\tab}\hich\af1\dbch\af31505\loch\f1
In the routing preferences manager for a pipe type, add these fittings and segments with minimum and maximum size ranges.
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 3.\tab}\hich\af1\dbch\af31505\loch\f1 Run the Routing Preference Analysis command, and select \hich\af1\dbch\af31505\loch\f1
a pipe type.
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 4.\tab}\hich\af1\dbch\af31505\loch\f1 \hich\f1 Click the \'93\loch\f1 \hich\f1 Find problems\'94\loch\f1
button and read the XML output containing the warnings listed above.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070\charrsid3083924
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9510120 {\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\kerning2\insrsid9510120
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid16007539 \hich\af1\dbch\af31505\loch\f1 To examine what segments and fittings your routing preferences will use for a give size, select a pipe size from the combo box, c}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 \hich\f1 lick the \'93}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid16007539 \hich\af1\dbch\af31505\loch\f1 Chec\hich\af1\dbch\af31505\loch\f1
k Specific Size}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120 \loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 button}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid16007539 ,}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 read the output}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid16007539 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid14811145\charrsid3083924
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\ul\kerning2\insrsid266070 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\ul\kerning2\insrsid9510120\charrsid9510120 \hich\af1\dbch\af31505\loch\f1 Routing Preference Builder}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \b\f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 (CommandReadPreferences and CommandWritePreferences)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid9510120\charrsid9510120
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 A\hich\af1\dbch\af31505\loch\f1
tool for setting pipe type, fitting, and routing preferences in a project from data in an XML file and also exporting those same preferences to XML for archival, documentation, and collaboration.\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0
\b\f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 Summary: }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 These commands allow a user to work with routing
\hich\af1\dbch\af31505\loch\f1 preference data in a shareable XML format suitable for reuse in a wide variety of BIM management environments.}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120\charrsid3083924
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9510120
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1
\par \hich\af1\dbch\af31505\loch\f1 Classes:
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.RoutingPreferenceManager \hich\f1 \endash \loch\f1 manages routing preference rules and conditions for various MEP curve types.
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.R\hich\af1\dbch\af31505\loch\f1 evit.DB.RoutingPreferenceRule
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Plumbing.PipeType
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Plumbing.PipeSegment
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Plumbing.PipeScheduleType
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.PrimarySizeCriterion
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FamilySymbol
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Material
\par
\par
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid9510120 \hich\af1\dbch\af31505\loch\f1 Project Files:
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 CommandReadPreferences.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070\charrsid5928478 \hich\af1\dbch\af31505\loch\f1 \hich\f1
Main command file for the \'93\loch\f1 \hich\f1 Read Preferences from XML\'94\loch\f1 command.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070\charrsid5928478
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 CommandWritePreferences.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070\charrsid5928478 \hich\af1\dbch\af31505\loch\f1 \hich\f1
Main command file for the \'93\loch\f1 \hich\f1 Write Preferences to XML\'94\loch\f1 command.
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070
\par \hich\af1\dbch\af31505\loch\f1 RoutingPreferenceBuilder.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070\charrsid5928478 \hich\af1\dbch\af31505\loch\f1
Class to read and write XML and\hich\af1\dbch\af31505\loch\f1 routing preference data.
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070
\par \hich\af1\dbch\af31505\loch\f1 RoutingPreferenceBuilderUtility.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070\charrsid5928478 \hich\af1\dbch\af31505\loch\f1
Helper classes used by RoutingPreferenceBuilder.
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070\charrsid8601128 \hich\af1\dbch\af31505\loch\f1 RoutingPreference}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid11095090 \hich\af1\dbch\af31505\loch\f1 Sample}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070\charrsid8601128 \hich\af1\dbch\af31505\loch\f1 .xml}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0\pararsid266070 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2052\langfenp2052\insrsid266070\charrsid5928478 \hich\af1\dbch\af31505\loch\f1
A sample data file containing families, schedules, pipe types, segments, sizes, rules, and criteria.
\par \hich\af1\dbch\af31505\loch\f1 RoutingPreferenceBuilderData.xsd \hich\f1 \endash \loch\f1 an xml schema used to validate a RoutingPreferenceBuilder xml document.
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9510120 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid9510120
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid266070 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 1.\tab}}\pard \ltrpar\qj \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls3\rin0\lin360\itap0\pararsid266070 {\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 Open a Revit project containing at least one PipeType in Revit MEP.
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 2.\tab}\hich\af1\dbch\af31505\loch\f1 Examine the pipe, schedule, segment, and routing preferen\hich\af1\dbch\af31505\loch\f1
ce rule data in }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid11095090\charrsid8601128 \hich\af1\dbch\af31505\loch\f1 RoutingPreference}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid11095090 \hich\af1\dbch\af31505\loch\f1
Sample}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070\charrsid8601128 \hich\af1\dbch\af31505\loch\f1 .xml}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 .
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 3.\tab}\hich\af1\dbch\af31505\loch\f1 Update any paths to family .rfa files as necessary.
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1 4.\tab}\hich\af1\dbch\af31505\loch\f1 \hich\f1 Run the \'93\loch\f1 \hich\f1 CommandReadPreferences\'94\loch\f1
command, select the sample RoutingPreference}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid11623925 \hich\af1\dbch\af31505\loch\f1 Sample}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070 \hich\af1\dbch\af31505\loch\f1
.xml file, and note all of the pipetypes, schedules, segments, a\hich\af1\dbch\af31505\loch\f1 \hich\f1 nd routing preference rules added to the project. Run the \'93\loch\f1 \hich\f1 CommandWritePreferences\'94\loch\f1
command, select a new file to create, and note the exported routing preference data in the new XML file.
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14811145 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid14811145
\par
\par \hich\af1\dbch\af31505\loch\f1 \hich\f1 Note: Place the optional \'93\loch\f1 \hich\f1 familypaths.xml\'94\loch\f1 file in your Routin\hich\af1\dbch\af31505\loch\f1
gPreferenceTools.dll folder with additional paths to family files that you use other than the default content path that Revit specifies. This will allow Revit to search for family files in additional locations when reading and writing routing preferences
\hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 to and from xml.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid14811145\charrsid3083924
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9510120 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid266070\charrsid3083924
\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\kerning2\insrsid4525287
\par }{\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\kerning2\insrsid14811145
\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210030dd4329a8060000a41b0000160000007468656d652f7468656d652f
7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
e877f0034e16bafb0e258ebb4faf06b769e888340b103d331115bebc4eb813bf83291b63624a0d1475a756c734f9bbc2cd28546ecbe1e20a3794ca175f3fae90
fb6d2dd99bb07b55e5ccf68942bd0877b23c77b908e8db5f9db7f024d9239010f35bd4bbe2fcae387bfff9e2bc289f2fbe24cfaa301468dd8bd846dbb4ddf1c2
ae7b4c191ba8292337a469bc25ec3d411f06f53a73e224c5292c8de0516732307070a1c0660d125c7d44553488700a4d7bddd3444299910e254ab984c3a219ae
a4adf1d0f82b7bd46cea4388ad1c12ab5d1ed8e1153d9c9f350a3246aad01c6873462b9ac05999ad5cc988826eafc3acae853a33b7ba11cd1445875ba1b236b1
399483c90bd560b0b0263435085a21b0f22a9cf9356b38ec6046026d77eba3dc2dc60b17e92219e180643ed27acffba86e9c94c7ca9c225a0f1b0cfae0788ad5
4adc5a9aec1b703b8b93caec1a0bd8e5de7b132fe5113cf312503b998e2c2927274bd051db6b35979b1ef271daf6c6704e86c73805af4bdd476216c26593af84
0dfb5393d964f9cc9bad5c313709ea70f561ed3ea7b053075221d51696910d0d339585004b34272bff7213cc7a510a5454a3b349b1b206c1f0af490176745d4b
c663e2abb2b34b23da76f6352ba57ca2881844c1111ab189d8c7e07e1daaa04f40255c77988aa05fe06e4e5bdb4cb9c5394bbaf28d98c1d971ccd20867e556a7
689ec9166e0a522183792b8907ba55ca6e943bbf2a26e52f48957218ffcf54d1fb09dc3eac04da033e5c0d0b8c74a6b43d2e54c4a10aa511f5fb021a07533b20
5ae07e17a621a8e082dafc17e450ffb739676998b48643a4daa7211214f623150942f6a02c99e83b85583ddbbb2c4996113211551257a656ec1139246ca86be0
aadedb3d1441a89b6a929501833b197fee7b9641a3503739e57c732a59b1f7da1cf8a73b1f9bcca0945b874d4393dbbf10b1680f66bbaa5d6f96e77b6f59113d
316bb31a795600b3d256d0cad2fe354538e7566b2bd69cc6cbcd5c38f0e2bcc63058344429dc2121fd07f63f2a7c66bf76e80d75c8f7a1b622f878a18941d840
545fb28d07d205d20e8ea071b283369834296bdaac75d256cb37eb0bee740bbe278cad253b8bbfcf69eca23973d939b97891c6ce2cecd8da8e2d343578f6648a
c2d0383fc818c798cf64e52f597c740f1cbd05df0c264c49134cf09d4a60e8a107260f20f92d47b374e32f000000ffff0300504b030414000600080000002100
0dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f7
8277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89
d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd500
1996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0f
bfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6
a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a
0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021
0030dd4329a8060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d001400060008
00000021000dd1909fb60000001b0100002700000000000000000000000000b20900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ad0a00000000}
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
4d73786d6c322e534158584d4c5265616465722e362e30000000000000000000000e0000
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffdffffff04000000feffffff05000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff010000000c6ad98892f1d411a65f0040963251e50000000000000000000000009073
e5d914efcd010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff0200000000000000000000000000000000000000000000009073e5d914efcd01
9073e5d914efcd0100000000000000000000000053004b0041003100c400d6004200da005300c400ca004a00d200c3004d005300cc00c9005400d400c500d0003d003d000000000000000000000000000000000032000101ffffffffffffffff0300000000000000000000000000000000000000000000009073e5d914ef
cd019073e5d914efcd010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000
00000000000000000000000000000000d800000000000000010000000200000003000000feffffff0500000006000000070000000800000009000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3c623a536f75726365732053656c65637465645374796c653d225c4150412e58534c22205374796c654e616d653d224150412220786d6c6e733a623d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f7267
2f6f6666696365446f63756d656e742f323030362f6269626c696f6772617068792220786d6c6e733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f677261706879223e3c2f623a536f75726365733e00000000
0000000000000000000000000000000000000000000000000000000000000000000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b39333142
413034382d374136302d344134412d383943412d3333313242323934463439377d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c
64733a736368656d615265662064733a7572693d22687474703a2f2f736368656d61732e6f70656e500072006f007000650072007400690065007300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000200ffffffffffffffffffffffff000000000000
0000000000000000000000000000000000000000000000000000000000000400000055010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f677261706879222f3e3c2f64733a736368656d61526566733e3c2f64733a6461746173746f
72654974656d3e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}
@@ -0,0 +1,410 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// Queries all routing preferences and reports potential problems in the form of an XDocument.
/// </summary>
internal class Analyzer
{
#region Data
private Autodesk.Revit.DB.Document m_document;
private Autodesk.Revit.DB.RoutingPreferenceManager m_routingPreferenceManager;
private double m_mepSize;
#endregion
#region Public interface
/// <summary>
/// Constructor
/// </summary>
/// <param name="routingPreferenceManager"></param>
/// <param name="document"></param>
public Analyzer(RoutingPreferenceManager routingPreferenceManager, Document document)
{
m_routingPreferenceManager = routingPreferenceManager;
m_document = document;
m_mepSize = 0;
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="routingPreferenceManager"></param>
/// <param name="mepSize"></param>
/// <param name="document"></param>
public Analyzer(RoutingPreferenceManager routingPreferenceManager, double mepSize, Document document)
{
m_routingPreferenceManager = routingPreferenceManager;
m_document = document;
m_mepSize = Convert.ConvertValueToFeet(mepSize, m_document);
}
/// <summary>
/// Get specific size query
/// </summary>
/// <returns></returns>
public XDocument GetSpecificSizeQuery()
{
XDocument xReportDoc = new XDocument();
XElement xroot = new XElement(XName.Get("RoutingPreferenceAnalysisSizeQuery"));
xroot.Add(GetHeaderInformation());
foreach (PartIdInfo partId in GetPreferredFittingsAndSegments())
{
xroot.Add(partId.GetXml(m_document));
}
xReportDoc.Add(xroot);
return xReportDoc;
}
/// <summary>
/// Get all segments from a the currently selected pipe type, get each size from each segment,
/// collect, sort, and return.
/// </summary>
public static List<double> GetAvailableSegmentSizes(RoutingPreferenceManager routingPreferenceManager, Autodesk.Revit.DB.Document document)
{
System.Collections.Generic.HashSet<double> sizes = new HashSet<double>();
int segmentCount = routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Segments);
for (int index = 0; index != segmentCount; ++index)
{
RoutingPreferenceRule segmentRule = routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Segments, index);
Segment segment = document.GetElement(segmentRule.MEPPartId) as Segment;
foreach (MEPSize size in segment.GetSizes())
{
sizes.Add(size.NominalDiameter);
}
}
List<double> sizesSorted = sizes.ToList();
sizesSorted.Sort();
return sizesSorted;
}
/// <summary>
/// Returns XML data for a variety of potential routing-preference problems.
/// </summary>
/// <returns></returns>
public XDocument GetWarnings()
{
XDocument xReportDoc = new XDocument();
XElement xroot = new XElement(XName.Get("RoutingPreferenceAnalysis"));
xroot.Add(GetHeaderInformation());
XElement xWarnings = new XElement(XName.Get("Warnings"));
//None-range-warnings
foreach (RoutingPreferenceRuleGroupType groupType in Enum.GetValues(typeof(RoutingPreferenceRuleGroupType)).Cast<RoutingPreferenceRuleGroupType>())
{
if (IsRuleSetToRangeNone(m_routingPreferenceManager, groupType, 0))
{
XElement xNoRangeSet = new XElement(XName.Get("NoRangeSet"));
xNoRangeSet.Add(new XAttribute(XName.Get("groupType"), groupType.ToString()));
if (IsGroupSetToRangeNone(m_routingPreferenceManager, groupType))
{
xNoRangeSet.Add(new XAttribute(XName.Get("rule"), "allRules"));
}
else
{
xNoRangeSet.Add(new XAttribute(XName.Get("rule"), "firstRule"));
}
xWarnings.Add(xNoRangeSet);
}
}
//tee/tap warnings
if (!IsPreferredJunctionTypeValid(m_routingPreferenceManager))
{
XElement xJunctionFittingsNotDefined = new XElement(XName.Get("FittingsNotDefinedForPreferredJunction"));
xWarnings.Add(xJunctionFittingsNotDefined);
}
//size range warnings for elbow, Junction, and Cross
XElement xSegmentElbowWarning = GetSegmentRangeNotCoveredWarning(m_routingPreferenceManager, RoutingPreferenceRuleGroupType.Elbows);
if (xSegmentElbowWarning != null)
xWarnings.Add(xSegmentElbowWarning);
XElement xSegmentTeeWarning = GetSegmentRangeNotCoveredWarning(m_routingPreferenceManager, RoutingPreferenceRuleGroupType.Junctions);
if (xSegmentTeeWarning != null)
xWarnings.Add(xSegmentTeeWarning);
XElement xSegmentCrossWarning = GetSegmentRangeNotCoveredWarning(m_routingPreferenceManager, RoutingPreferenceRuleGroupType.Crosses);
if (xSegmentCrossWarning != null)
xWarnings.Add(xSegmentCrossWarning);
xroot.Add(xWarnings);
xReportDoc.Add(xroot);
return xReportDoc;
}
#endregion
#region Analyis helper methods
/// <summary>
/// Get basic information about the PipeType
/// </summary>
private XElement GetHeaderInformation()
{
XElement xHeader = new XElement(XName.Get("PipeType"));
string pipeTypeName = m_document.GetElement(m_routingPreferenceManager.OwnerId).Name;
xHeader.Add(new XAttribute(XName.Get("name"), pipeTypeName));
xHeader.Add(new XAttribute(XName.Get("elementId"), m_routingPreferenceManager.OwnerId.ToString()));
return xHeader;
}
/// <summary>
/// Checks to see if any segments in the routing preference manager have sizes that cannot be fitted with fittings defined in a rule group type, such as "Elbow."
/// For example, if a segment rule defines a segment be used from sizes 2" to 12", and there are three elbows rules defined to be used from ranges
/// 2"-4", 4"-7", and 9"-14", this method will return warning information specifying the sizes (8", 8.5", etc...) not covered by elbow fittings.
/// </summary>
private XElement GetSegmentRangeNotCoveredWarning(RoutingPreferenceManager routingPreferenceManager, RoutingPreferenceRuleGroupType groupType)
{
for (int index = 0; index != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Segments); ++index)
{
RoutingPreferenceRule rule = routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Segments, index);
if (rule.MEPPartId == ElementId.InvalidElementId)
continue;
if (rule.NumberOfCriteria == 0) //double check all/none
continue;
PrimarySizeCriterion psc = rule.GetCriterion(0) as PrimarySizeCriterion;
PipeSegment segment = m_document.GetElement(rule.MEPPartId) as PipeSegment;
List<double> sizesNotCovered = new List<double>();
bool isCovered = CheckSegmentForValidCoverage(routingPreferenceManager, psc.MinimumSize, psc.MaximumSize, rule.MEPPartId, groupType, sizesNotCovered);
if (!isCovered)
{
XElement xSegmentNotCovered = new XElement(XName.Get("SegmentRangeNotCovered"));
xSegmentNotCovered.Add(new XAttribute(XName.Get("name"), segment.Name));
StringBuilder sBuilder = new StringBuilder();
foreach (double size in sizesNotCovered)
{
double roundedSize = Convert.ConvertValueDocumentUnits(size, m_document);
sBuilder.Append(roundedSize.ToString() + " ");
}
sBuilder.Remove(sBuilder.Length - 1, 1);
xSegmentNotCovered.Add(new XAttribute(XName.Get("sizes"), sBuilder.ToString()));
xSegmentNotCovered.Add(new XAttribute(XName.Get("unit"), m_document.GetUnits().GetFormatOptions(SpecTypeId.PipeSize).GetUnitTypeId().TypeId));
xSegmentNotCovered.Add(new XAttribute(XName.Get("groupType"), groupType.ToString()));
return xSegmentNotCovered;
}
}
return null;
}
private bool CheckSegmentForValidCoverage(RoutingPreferenceManager routingPreferenceManager, double lowerBound, double upperBound, ElementId segmentId, RoutingPreferenceRuleGroupType groupType, List<double> sizesNotCovered)
{
bool retval = true;
if (segmentId == ElementId.InvalidElementId)
throw new Exception("Invalid segment ElementId");
PipeSegment segment = this.m_document.GetElement(segmentId) as PipeSegment;
foreach (MEPSize size in segment.GetSizes())
{
//skip sizes outside of rp bounds
if (size.NominalDiameter < lowerBound)
continue;
if (size.NominalDiameter > upperBound)
break;
RoutingConditions conditions = new RoutingConditions(RoutingPreferenceErrorLevel.None);
conditions.AppendCondition(new RoutingCondition(size.NominalDiameter));
ElementId foundFitting = routingPreferenceManager.GetMEPPartId(groupType, conditions);
if (foundFitting == ElementId.InvalidElementId)
{
sizesNotCovered.Add(size.NominalDiameter);
retval = false;
}
}
return retval;
}
private bool IsRuleSetToRangeNone(RoutingPreferenceManager routingPreferenceManager, RoutingPreferenceRuleGroupType groupType, int index)
{
if (routingPreferenceManager.GetNumberOfRules(groupType) == 0)
{
return false;
}
RoutingPreferenceRule rule = routingPreferenceManager.GetRule(groupType, index);
if (rule.NumberOfCriteria == 0)
{
return false;
}
PrimarySizeCriterion psc = rule.GetCriterion(0) as PrimarySizeCriterion;
if (psc.IsEqual(PrimarySizeCriterion.None()))
{
return true;
}
else
return false;
}
private bool IsGroupSetToRangeNone(RoutingPreferenceManager routingPreferenceManager, RoutingPreferenceRuleGroupType groupType)
{
bool retval = true;
if (routingPreferenceManager.GetNumberOfRules(groupType) == 0)
{
return false;
}
for (int index = 0; index != routingPreferenceManager.GetNumberOfRules(groupType); ++index)
{
if (!(IsRuleSetToRangeNone(routingPreferenceManager, groupType, index)))
retval = false;
}
return retval;
}
/// <summary>
/// Check to see if the routing preferences specify a preferred junction type but do not have any
/// rules with valid fittings for that type (e.g, "Tee" is the preferred junction type, but only "Tap" fittings
/// are specified in junction rules.)
/// </summary>
/// <param name="routingPreferenceManager"></param>
/// <returns></returns>
private bool IsPreferredJunctionTypeValid(RoutingPreferenceManager routingPreferenceManager)
{
PreferredJunctionType preferredJunctionType = routingPreferenceManager.PreferredJunctionType;
if (routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Junctions) == 0)
return false;
bool teeDefined = false;
bool tapDefined = false;
for (int index = 0; index != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Junctions); ++index)
{
RoutingPreferenceRule rule = routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Junctions, index);
if (rule.MEPPartId == ElementId.InvalidElementId)
continue;
FamilySymbol familySymbol = this.m_document.GetElement(rule.MEPPartId) as FamilySymbol;
Parameter paramPartType = familySymbol.Family.get_Parameter(BuiltInParameter.FAMILY_CONTENT_PART_TYPE);
if (paramPartType == null)
throw new Exception("Null partType parameter.");
PartType partType = (PartType)paramPartType.AsInteger();
if ((partType == PartType.Tee))
teeDefined = true;
else if (
(partType == PartType.TapAdjustable) ||
(partType == PartType.TapPerpendicular) ||
(partType == PartType.SpudPerpendicular) ||
(partType == PartType.SpudAdjustable)
)
tapDefined = true;
}
if ((preferredJunctionType == PreferredJunctionType.Tap) && !tapDefined)
return false;
if ((preferredJunctionType == PreferredJunctionType.Tee) && !teeDefined)
return false;
return true;
}
private string GetFittingName(ElementId id)
{
if (id == ElementId.InvalidElementId)
throw new Exception("Invalid ElementId");
FamilySymbol symbol = m_document.GetElement(id) as FamilySymbol;
return symbol.Family.Name + " " + symbol.Name;
}
private string GetSegmentName(ElementId id)
{
if (id == ElementId.InvalidElementId)
throw new Exception("Invalid ElementId");
PipeSegment segment = m_document.GetElement(id) as PipeSegment;
return segment.Name;
}
/// <summary>
///Using routing preferences, display found segment and fitting info from the size and pipe type specified in the dialog.
/// </summary>
private List<PartIdInfo> GetPreferredFittingsAndSegments()
{
List<PartIdInfo> partIdInfoList = new List<PartIdInfo>();
RoutingConditions conditions = new RoutingConditions(RoutingPreferenceErrorLevel.None);
conditions.AppendCondition(new RoutingCondition(m_mepSize));
foreach (RoutingPreferenceRuleGroupType groupType in Enum.GetValues(typeof(RoutingPreferenceRuleGroupType)))
{
if (groupType == RoutingPreferenceRuleGroupType.Undefined)
continue;
IList<ElementId> preferredTypes = new List<ElementId>();
ElementId preferredType = m_routingPreferenceManager.GetMEPPartId(groupType, conditions);
//GetMEPPartId is the main "query" method of the
//routing preferences API that evaluates conditions and criteria and returns segment and fitting elementIds that meet
//those criteria.
if (groupType != RoutingPreferenceRuleGroupType.Segments)
{
preferredTypes.Add(preferredType);
}
else //Get all segments that support a given size, not just the first segment.
{
preferredTypes = m_routingPreferenceManager.GetSharedSizes(m_mepSize, ConnectorProfileType.Round);
}
partIdInfoList.Add(new PartIdInfo(groupType, preferredTypes)); //Collect a PartIdInfo object for each group type.
}
return partIdInfoList;
}
#endregion
}
}
@@ -0,0 +1,72 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// Main Revit command
/// </summary>
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.ReadOnly)]
public class Command : Autodesk.Revit.UI.IExternalCommand
{
/// <summary>
/// Implement this method as an external command for Revit.
/// </summary>
/// <param name="commandData">An object that is passed to the external application
/// which contains data related to the command,
/// such as the application object and active view.</param>
/// <param name="message">A message that can be set by the external application
/// which will be displayed if a failure or cancellation is returned by
/// the external command.</param>
/// <param name="elements">A set of elements to which the external application
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
/// <returns>Return the status of the external command.
/// A result of Succeeded means that the API external method functioned as expected.
/// Cancelled can be used to signify that the user cancelled the external operation
/// at some point. Failure should be returned if the application is unable to proceed with
/// the operation.</returns>
public Autodesk.Revit.UI.Result Execute(Autodesk.Revit.UI.ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
{
if (!Validation.ValidateMep(commandData.Application.Application))
{
Validation.MepWarning();
return Autodesk.Revit.UI.Result.Succeeded;
}
if (!Validation.ValidatePipesDefined(commandData.Application.ActiveUIDocument.Document))
{
Validation.PipesDefinedWarning();
return Autodesk.Revit.UI.Result.Succeeded;
}
MainWindow mainWindow = new MainWindow(commandData.Application);
mainWindow.ShowDialog();
return Autodesk.Revit.UI.Result.Succeeded;
}
}
}
@@ -0,0 +1,31 @@
<Window x:Class="Revit.SDK.Samples.RoutingPreferenceTools.CS.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Height="325" Width="500" Title="Routing Preference Analysis">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="200"></RowDefinition>
</Grid.RowDefinitions>
<Label Grid.Row="0" Name="label_SelectPipeType">Select a pipe type.</Label>
<ComboBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" Name="comboBox_PipeTypes" SelectionChanged="comboBox_PipeTypes_SelectionChanged"></ComboBox>
<Button Grid.Row="2" Grid.ColumnSpan="2" Name="button_CheckWarnings" Click="button_CheckWarnings_Click">Check All Routing Preferences</Button>
<Button Grid.Row="2" Grid.Column="2" Name="button_CheckSpecificSize" Click="button_CheckSpecificSize_Click">Check Specific Size</Button>
<ComboBox Grid.Row="2" Grid.Column="3" Name="comboBox_Sizes"></ComboBox>
<Label Grid.Row="3" Name="label_Warnings">Output</Label>
<TextBox Grid.Row="4" Grid.ColumnSpan="4" Grid.RowSpan="2" Name="textBox_output"></TextBox>
</Grid>
</Window>
@@ -0,0 +1,181 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
using System.Xml;
using System.Xml.Linq;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="application"></param>
public MainWindow(Autodesk.Revit.UI.UIApplication application)
{
InitializeComponent();
m_application = application;
if (m_application.ActiveUIDocument == null)
{
Autodesk.Revit.UI.TaskDialog.Show("RP Analysis", "Null Document");
this.Close();
}
PopulatePipeTypeList();
PopulateSizeList();
}
/// <summary>
/// Get the selected pipe size (in inches) from the dialog
/// </summary>
private double GetSelectedSize()
{
return double.Parse(comboBox_Sizes.SelectedItem.ToString());
}
/// <summary>
/// Display all sizes available in given pipe type in the dialog.
/// </summary>
private void PopulateSizeList()
{
comboBox_Sizes.Items.Clear();
List<double> sizes = Analyzer.GetAvailableSegmentSizes(GetSelectedPipeType().RoutingPreferenceManager, m_application.ActiveUIDocument.Document);
foreach (double size in sizes)
{
double unitAdjustedSize = Convert.ConvertValueDocumentUnits(size, m_application.ActiveUIDocument.Document);
comboBox_Sizes.Items.Add(unitAdjustedSize.ToString());
}
comboBox_Sizes.SelectedIndex = 0;
}
/// <summary>
/// Get all the PipeTypes in the document and display them in the window's combo box.
/// </summary>
private void PopulatePipeTypeList()
{
FilteredElementCollector collector = new FilteredElementCollector(m_application.ActiveUIDocument.Document);
collector.OfClass(typeof(PipeType));
foreach (PipeType pipeType in collector.ToElements().Cast<PipeType>())
{
comboBox_PipeTypes.Items.Add(pipeType.Name + ", Id: " + pipeType.Id);
}
comboBox_PipeTypes.SelectedIndex = 0;
}
/// <summary>
/// Look up a pipe type by ElementId string and return it.
/// </summary>
/// <returns></returns>
private PipeType GetSelectedPipeType()
{
string selectedString = comboBox_PipeTypes.SelectedItem.ToString();
string[] selectedsplit = selectedString.Split(':');
if (selectedsplit.Length != 2)
throw new ArgumentException();
ElementId id = new ElementId(int.Parse(selectedsplit[1]));
return m_application.ActiveUIDocument.Document.GetElement(id) as PipeType;
}
/// <summary>
/// Get the selected PipeType from the combo box in the window, get its RoutingPreferenceManager, and analyze it for problems.
/// Write all potential problems to the window's text field as formatted XML.
/// </summary>
private void button_CheckWarnings_Click(object sender, RoutedEventArgs e)
{
Analyzer routingPrefernceAnalyzer = new Analyzer(GetSelectedPipeType().RoutingPreferenceManager, this.m_application.ActiveUIDocument.Document);
XDocument results = routingPrefernceAnalyzer.GetWarnings();
XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
xmlWriterSettings.Indent = true;
xmlWriterSettings.NewLineOnAttributes = false;
StringBuilder output = new StringBuilder();
XmlWriter writer = XmlWriter.Create(output, xmlWriterSettings);
results.WriteTo(writer);
writer.Flush();
writer.Close();
this.textBox_output.Text = output.ToString();
}
/// <summary>
/// Button CheckSpecificSize click event handler
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button_CheckSpecificSize_Click(object sender, RoutedEventArgs e)
{
Analyzer routingPrefernceAnalyzer = new Analyzer(GetSelectedPipeType().RoutingPreferenceManager, GetSelectedSize(), this.m_application.ActiveUIDocument.Document);
XDocument results = routingPrefernceAnalyzer.GetSpecificSizeQuery();
XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
xmlWriterSettings.Indent = true;
xmlWriterSettings.NewLineOnAttributes = false;
StringBuilder output = new StringBuilder();
XmlWriter writer = XmlWriter.Create(output, xmlWriterSettings);
results.WriteTo(writer);
writer.Flush();
writer.Close();
this.textBox_output.Text = output.ToString();
}
/// <summary>
/// ComboBox PipeTypes selection changed event handler
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void comboBox_PipeTypes_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
PopulateSizeList();
}
private Autodesk.Revit.UI.UIApplication m_application;
}
}
@@ -0,0 +1,133 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
using System.Xml.Linq;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// This class contains a routing preference rule group and list of elementIds that correspond
/// to found segments and fittings that meet criteria specified through a routing preference manager.
/// </summary>
public class PartIdInfo
{
// List of part Ids
private List<ElementId> m_ids;
// group type
private RoutingPreferenceRuleGroupType m_groupType;
/// <summary>
/// Id
/// </summary>
public List<ElementId> Id
{
get { return m_ids; }
}
/// <summary>
/// Group type
/// </summary>
public RoutingPreferenceRuleGroupType GroupType
{
get { return m_groupType; }
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="groupType"></param>
/// <param name="ids"></param>
public PartIdInfo(RoutingPreferenceRuleGroupType groupType, IList<ElementId> ids)
{
m_ids = new List<ElementId>();
m_groupType = groupType;
m_ids.AddRange(ids);
}
/// <summary>
/// Build XML information of document
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
public XElement GetXml(Autodesk.Revit.DB.Document document)
{
XElement xPartInfo = new XElement(XName.Get("PartInfo"));
xPartInfo.Add(new XAttribute(XName.Get("groupType"), m_groupType.ToString()));
xPartInfo.Add(new XAttribute(XName.Get("partNames"), GetFittingNames(document)));
return xPartInfo;
}
private string GetFittingName(Document document, ElementId id)
{
string fittingName = " None ";
if (id != ElementId.InvalidElementId)
{
Element element = document.GetElement(id);
if (element is Segment)
{
fittingName = element.Name;
}
else
{
FamilySymbol familySymbol = element as FamilySymbol;
fittingName = familySymbol.Family.Name + " " + familySymbol.Name;
}
}
return fittingName;
}
/// <summary>
/// Fitting name
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
private string GetFittingNames(Document document)
{
string fittingNames = "";
if (m_ids.Count == 0)
{
fittingNames += "None -1";
}
foreach (ElementId id in m_ids)
{
fittingNames += GetFittingName(document, id) + " " + id.ToString() + ", ";
}
return fittingNames.Remove(fittingNames.Length - 2, 2);
}
}
}
@@ -0,0 +1,106 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
using System.Xml.Linq;
using System.IO;
using System.Xml;
using System.Diagnostics;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// A command to read a routing preference builder xml file and add pipe types, schedules, segments, and sizes, and routing preferences rules to the
/// document from the xml data.
/// </summary>
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
public class CommandReadPreferences : Autodesk.Revit.UI.IExternalCommand
{
/// <summary>
/// Implement this method as an external command for Revit.
/// </summary>
/// <param name="commandData">An object that is passed to the external application
/// which contains data related to the command,
/// such as the application object and active view.</param>
/// <param name="message">A message that can be set by the external application
/// which will be displayed if a failure or cancellation is returned by
/// the external command.</param>
/// <param name="elements">A set of elements to which the external application
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
/// <returns>Return the status of the external command.
/// A result of Succeeded means that the API external method functioned as expected.
/// Cancelled can be used to signify that the user cancelled the external operation
/// at some point. Failure should be returned if the application is unable to proceed with
/// the operation.</returns>
public Autodesk.Revit.UI.Result Execute(Autodesk.Revit.UI.ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
{
if (!Validation.ValidateMep(commandData.Application.Application))
{
Validation.MepWarning();
return Autodesk.Revit.UI.Result.Succeeded;
}
if (!Validation.ValidatePipesDefined(commandData.Application.ActiveUIDocument.Document))
{
Validation.PipesDefinedWarning();
return Autodesk.Revit.UI.Result.Succeeded;
}
Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog();
ofd.DefaultExt = ".xml";
ofd.Filter = "RoutingPreference Builder Xml files (*.xml)|*.xml";
if (ofd.ShowDialog() == true)
{
StreamReader reader = new StreamReader(ofd.FileName);
XDocument routingPreferenceBuilderDoc = XDocument.Load(new XmlTextReader(reader));
reader.Close();
//Distribute the .xsd file to routing preference builder xml authors as necessary.
string xmlValidationMessage;
if (!SchemaValidationHelper.ValidateRoutingPreferenceBuilderXml(routingPreferenceBuilderDoc, out xmlValidationMessage))
{
Autodesk.Revit.UI.TaskDialog.Show("RoutingPreferenceBuilder", "Xml file is not a valid RoutingPreferenceBuilder xml document. Please check RoutingPreferenceBuilderData.xsd. " + xmlValidationMessage);
return Autodesk.Revit.UI.Result.Succeeded;
}
try
{
RoutingPreferenceBuilder builder = new RoutingPreferenceBuilder(commandData.Application.ActiveUIDocument.Document);
builder.ParseAllPipingPoliciesFromXml(routingPreferenceBuilderDoc);
Autodesk.Revit.UI.TaskDialog.Show("RoutingPreferenceBuilder", "Routing Preferences imported successfully.");
}
catch (RoutingPreferenceDataException ex)
{
Autodesk.Revit.UI.TaskDialog.Show("RoutingPreferenceBuilder error: ", ex.ToString());
}
}
return Autodesk.Revit.UI.Result.Succeeded;
}
}
}
@@ -0,0 +1,101 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
using System.Xml.Linq;
using System.IO;
using System.Xml;
using System.Diagnostics;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// A command to read routing preference data from a document and write an XML file summarizing it that can later be read by the
/// CommandReadPreferences command.
/// </summary>
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.ReadOnly)]
public class CommandWritePreferences : Autodesk.Revit.UI.IExternalCommand
{
/// <summary>
/// Implement this method as an external command for Revit.
/// </summary>
/// <param name="commandData">An object that is passed to the external application
/// which contains data related to the command,
/// such as the application object and active view.</param>
/// <param name="message">A message that can be set by the external application
/// which will be displayed if a failure or cancellation is returned by
/// the external command.</param>
/// <param name="elements">A set of elements to which the external application
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
/// <returns>Return the status of the external command.
/// A result of Succeeded means that the API external method functioned as expected.
/// Cancelled can be used to signify that the user cancelled the external operation
/// at some point. Failure should be returned if the application is unable to proceed with
/// the operation.</returns>
public Autodesk.Revit.UI.Result Execute(Autodesk.Revit.UI.ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
{
if (!Validation.ValidateMep(commandData.Application.Application))
{
Validation.MepWarning();
return Autodesk.Revit.UI.Result.Succeeded;
}
if (!Validation.ValidatePipesDefined(commandData.Application.ActiveUIDocument.Document))
{
Validation.PipesDefinedWarning();
return Autodesk.Revit.UI.Result.Succeeded;
}
Microsoft.Win32.SaveFileDialog sfd = new Microsoft.Win32.SaveFileDialog();
sfd.DefaultExt = ".xml";
sfd.Filter = "RoutingPreference Builder Xml files (*.xml)|*.xml";
sfd.FileName = (System.IO.Path.GetFileNameWithoutExtension(commandData.Application.ActiveUIDocument.Document.PathName)) + ".routingPreferences.xml";
if (sfd.ShowDialog() == true)
{
RoutingPreferenceBuilder builder = new RoutingPreferenceBuilder(commandData.Application.ActiveUIDocument.Document);
bool pathsNotFound = false;
XDocument routingPreferenceBuilderDoc = builder.CreateXmlFromAllPipingPolicies(ref pathsNotFound);
XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
xmlWriterSettings.Indent = true;
xmlWriterSettings.NewLineOnAttributes = false;
XmlWriter writer = XmlWriter.Create(sfd.FileName, xmlWriterSettings);
routingPreferenceBuilderDoc.WriteTo(writer);
writer.Flush();
writer.Close();
string pathmessage = "";
if (pathsNotFound)
pathmessage = "One or more paths to .rfa files were not found. You may need to add these paths in manually to the generated xml file.";
Autodesk.Revit.UI.TaskDialog.Show("RoutingPreferenceBuilder", "Routing Preferences exported successfully. " + pathmessage);
}
return Autodesk.Revit.UI.Result.Succeeded;
}
}
}
@@ -0,0 +1,947 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
using System.Xml.Linq;
using System.IO;
using System.Xml;
using System.Diagnostics;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// Class to read and write XML and routing preference data
/// </summary>
public class RoutingPreferenceBuilder
{
#region Data
private IEnumerable<Segment> m_segments;
private IEnumerable<FamilySymbol> m_fittings;
private IEnumerable<Material> m_materials;
private IEnumerable<PipeScheduleType> m_pipeSchedules;
private IEnumerable<PipeType> m_pipeTypes;
private Autodesk.Revit.DB.Document m_document;
#endregion
#region Public interface
/// <summary>
/// Create an instance of the class and initialize lists of all segments, fittings, materials, schedules, and pipe types in the document.
/// </summary>
public RoutingPreferenceBuilder(Document document)
{
m_document = document;
m_segments = GetAllPipeSegments(m_document);
m_fittings = GetAllFittings(m_document);
m_materials = GetAllMaterials(m_document);
m_pipeSchedules = GetAllPipeScheduleTypes(m_document);
m_pipeTypes = GetAllPipeTypes(m_document);
}
/// <summary>
/// Reads data from an Xml source and loads pipe fitting families, creates segments, sizes, schedules, and routing preference rules from the xml data.
/// </summary>
/// <param name="xDoc">The Xml data source to read from</param>
public void ParseAllPipingPoliciesFromXml(XDocument xDoc)
{
if (m_pipeTypes.Count() == 0)
throw new RoutingPreferenceDataException("No pipe pipes defined in this project. At least one must be defined.");
FormatOptions formatOptionPipeSize = m_document.GetUnits().GetFormatOptions(SpecTypeId.PipeSize);
string docPipeSizeUnit = formatOptionPipeSize.GetUnitTypeId().TypeId;
string xmlPipeSizeUnit = xDoc.Root.Attribute("pipeSizeUnits").Value;
if (docPipeSizeUnit != xmlPipeSizeUnit)
throw new RoutingPreferenceDataException("Units from XML do not match current pipe size units.");
FormatOptions formatOptionRoughness = m_document.GetUnits().GetFormatOptions(SpecTypeId.PipingRoughness);
string docRoughnessUnit = formatOptionRoughness.GetUnitTypeId().TypeId;
string xmlRoughnessUnit = xDoc.Root.Attribute("pipeRoughnessUnits").Value;
if (docRoughnessUnit != xmlRoughnessUnit)
throw new RoutingPreferenceDataException("Units from XML do not match current pipe roughness units.");
Transaction loadFamilies = new Transaction(m_document, "Load Families");
loadFamilies.Start();
IEnumerable<XElement> families = xDoc.Root.Elements("Family");
FindFolderUtility findFolderUtility = new FindFolderUtility(m_document.Application);
foreach (XElement xfamily in families)
try
{
ParseFamilyFromXml(xfamily, findFolderUtility); //Load families.
}
catch (Exception ex)
{
loadFamilies.RollBack();
throw ex;
}
loadFamilies.Commit();
Transaction addPipeTypes = new Transaction(m_document, "Add PipeTypes");
addPipeTypes.Start();
IEnumerable<XElement> pipeTypes = xDoc.Root.Elements("PipeType");
foreach (XElement xpipeType in pipeTypes)
try
{
ParsePipeTypeFromXml(xpipeType); //Define new pipe types.
}
catch (Exception ex)
{
addPipeTypes.RollBack();
throw ex;
}
addPipeTypes.Commit();
Transaction addPipeSchedules = new Transaction(m_document, "Add Pipe Schedule Types");
addPipeSchedules.Start();
IEnumerable<XElement> pipeScheduleTypes = xDoc.Root.Elements("PipeScheduleType");
foreach (XElement xpipeScheduleType in pipeScheduleTypes)
try
{
ParsePipeScheduleTypeFromXml(xpipeScheduleType); //Define new pipe schedule types.
}
catch (Exception ex)
{
addPipeSchedules.RollBack();
throw ex;
}
addPipeSchedules.Commit();
//The code above have added some new pipe types, schedules, or fittings, so update the lists of all of these.
UpdatePipeTypesList();
UpdatePipeTypeSchedulesList();
UpdateFittingsList();
Transaction addPipeSegments = new Transaction(m_document, "Add Pipe Segments");
addPipeSchedules.Start();
IEnumerable<XElement> pipeSegments = xDoc.Root.Elements("PipeSegment"); //Define new segments.
foreach (XElement xpipeSegment in pipeSegments)
try
{
ParsePipeSegmentFromXML(xpipeSegment);
}
catch (Exception ex)
{
addPipeSchedules.RollBack();
throw ex;
}
addPipeSchedules.Commit();
UpdateSegmentsList(); //More segments may have been created, so update the segment list.
//Now that all of the various types that routing preferences use have been created or loaded, add all the routing preferences.
Transaction addRoutingPreferences = new Transaction(m_document, "Add Routing Preferences");
addRoutingPreferences.Start();
IEnumerable<XElement> routingPreferenceManagers = xDoc.Root.Elements("RoutingPreferenceManager");
foreach (XElement xroutingPreferenceManager in routingPreferenceManagers)
try
{
ParseRoutingPreferenceManagerFromXML(xroutingPreferenceManager);
}
catch (Exception ex)
{
addRoutingPreferences.RollBack();
throw ex;
}
addRoutingPreferences.Commit();
}
/// <summary>
/// Reads pipe fitting family, segment, size, schedule, and routing preference data from a document and summarizes it in Xml.
/// </summary>
/// <returns>An XDocument containing an Xml summary of routing preference information</returns>
public XDocument CreateXmlFromAllPipingPolicies(ref bool pathsNotFound)
{
//To export the full path name of all .rfa family files, use the FindFolderUtility class.
FindFolderUtility findFolderUtility = new FindFolderUtility(m_document.Application);
XDocument routingPreferenceBuilderDoc = new XDocument();
XElement xroot = new XElement(XName.Get("RoutingPreferenceBuilder"));
FormatOptions formatOptionPipeSize = m_document.GetUnits().GetFormatOptions(SpecTypeId.PipeSize);
string unitStringPipeSize = formatOptionPipeSize.GetUnitTypeId().TypeId;
xroot.Add(new XAttribute(XName.Get("pipeSizeUnits"), unitStringPipeSize));
FormatOptions formatOptionRoughness = m_document.GetUnits().GetFormatOptions(SpecTypeId.PipingRoughness);
string unitStringRoughness = formatOptionRoughness.GetUnitTypeId().TypeId;
xroot.Add(new XAttribute(XName.Get("pipeRoughnessUnits"), unitStringRoughness));
foreach (FamilySymbol familySymbol in this.m_fittings)
{
xroot.Add(CreateXmlFromFamily(familySymbol, findFolderUtility, ref pathsNotFound));
}
foreach (PipeType pipeType in m_pipeTypes)
{
xroot.Add(CreateXmlFromPipeType(pipeType));
}
foreach (PipeScheduleType pipeScheduleType in m_pipeSchedules)
{
xroot.Add(CreateXmlFromPipeScheduleType(pipeScheduleType));
}
foreach (PipeSegment pipeSegment in m_segments)
{
xroot.Add(CreateXmlFromPipeSegment(pipeSegment));
}
foreach (PipeType pipeType in m_pipeTypes)
{
xroot.Add(CreateXmlFromRoutingPreferenceManager(pipeType.RoutingPreferenceManager));
}
routingPreferenceBuilderDoc.Add(xroot);
return routingPreferenceBuilderDoc;
}
#endregion
#region XML parsing and generation
/// <summary>
/// Load a family from xml
/// </summary>
/// <param name="familyXElement"></param>
/// <param name="findFolderUtility"></param>
private void ParseFamilyFromXml(XElement familyXElement, FindFolderUtility findFolderUtility)
{
XAttribute xafilename = familyXElement.Attribute(XName.Get("filename"));
string familyPath = xafilename.Value;
if (!System.IO.File.Exists(familyPath))
{
string filename = System.IO.Path.GetFileName(familyPath);
familyPath = findFolderUtility.FindFileFolder(filename);
if (!System.IO.File.Exists(familyPath))
throw new RoutingPreferenceDataException("Cannot find family file: " + xafilename.Value);
}
if (string.Compare(System.IO.Path.GetExtension(familyPath), ".rfa", true) != 0)
throw new RoutingPreferenceDataException(familyPath + " is not a family file.");
try
{
if (!m_document.LoadFamily(familyPath))
return; //returns false if already loaded.
}
catch (System.Exception ex)
{
throw new RoutingPreferenceDataException("Cannot load family: " + xafilename.Value + ": " + ex.ToString());
}
}
/// <summary>
/// Create xml from a family
/// </summary>
/// <param name="pipeFitting"></param>
/// <param name="findFolderUtility"></param>
/// <param name="pathNotFound"></param>
/// <returns></returns>
private static XElement CreateXmlFromFamily(FamilySymbol pipeFitting, FindFolderUtility findFolderUtility, ref bool pathNotFound)
{
//Try to find the path of the .rfa file.
string path = findFolderUtility.FindFileFolder(pipeFitting.Family.Name + ".rfa");
string pathToWrite;
if (path == "")
{
pathNotFound = true;
pathToWrite = pipeFitting.Family.Name + ".rfa";
}
else
pathToWrite = path;
XElement xFamilySymbol = new XElement(XName.Get("Family"));
xFamilySymbol.Add(new XAttribute(XName.Get("filename"), pathToWrite));
return xFamilySymbol;
}
/// <summary>
/// Greate a PipeType from xml
/// </summary>
/// <param name="pipetypeXElement"></param>
private void ParsePipeTypeFromXml(XElement pipetypeXElement)
{
XAttribute xaName = pipetypeXElement.Attribute(XName.Get("name"));
ElementId pipeTypeId = GetPipeTypeByName(xaName.Value);
if (pipeTypeId == ElementId.InvalidElementId) //If the pipe type does not exist, create it.
{
PipeType newPipeType = m_pipeTypes.First().Duplicate(xaName.Value) as PipeType;
ClearRoutingPreferenceRules(newPipeType);
}
}
/// <summary>
/// Clear all routing preferences in a PipeType
/// </summary>
/// <param name="pipeType"></param>
private static void ClearRoutingPreferenceRules(PipeType pipeType)
{
foreach ( RoutingPreferenceRuleGroupType group in System.Enum.GetValues(typeof(RoutingPreferenceRuleGroupType)))
{
int ruleCount = pipeType.RoutingPreferenceManager.GetNumberOfRules(group);
for (int index = 0; index != ruleCount; ++index)
{
pipeType.RoutingPreferenceManager.RemoveRule(group, 0);
}
}
}
/// <summary>
/// Create Xml from a PipeType
/// </summary>
/// <param name="pipeType"></param>
/// <returns></returns>
private static XElement CreateXmlFromPipeType(PipeType pipeType)
{
XElement xPipeType = new XElement(XName.Get("PipeType"));
xPipeType.Add(new XAttribute(XName.Get("name"), pipeType.Name));
return xPipeType;
}
private void ParsePipeScheduleTypeFromXml(XElement pipeScheduleTypeXElement)
{
XAttribute xaName = pipeScheduleTypeXElement.Attribute(XName.Get("name"));
ElementId pipeScheduleTypeId = GetPipeScheduleTypeByName(xaName.Value);
if (pipeScheduleTypeId == ElementId.InvalidElementId) //If the pipe schedule type does not exist, create it.
m_pipeSchedules.First().Duplicate(xaName.Value);
}
/// <summary>
/// Create Xml from a PipeScheduleType
/// </summary>
/// <param name="pipeScheduleType"></param>
/// <returns></returns>
private static XElement CreateXmlFromPipeScheduleType(PipeScheduleType pipeScheduleType)
{
XElement xPipeSchedule = new XElement(XName.Get("PipeScheduleType"));
xPipeSchedule.Add(new XAttribute(XName.Get("name"), pipeScheduleType.Name));
return xPipeSchedule;
}
/// <summary>
/// Create a PipeSegment from XML
/// </summary>
/// <param name="segmentXElement"></param>
private void ParsePipeSegmentFromXML(XElement segmentXElement)
{
XAttribute xaMaterial = segmentXElement.Attribute(XName.Get("materialName"));
XAttribute xaSchedule = segmentXElement.Attribute(XName.Get("pipeScheduleTypeName"));
XAttribute xaRoughness = segmentXElement.Attribute(XName.Get("roughness"));
ElementId materialId = GetMaterialByName(xaMaterial.Value); //There is nothing in the xml schema for creating new materials -- any material specified must already exist in the document.
if (materialId == ElementId.InvalidElementId)
{
throw new RoutingPreferenceDataException("Cannot find Material: " + xaMaterial.Value + " in: " + segmentXElement.ToString());
}
ElementId scheduleId = GetPipeScheduleTypeByName(xaSchedule.Value);
double roughness;
bool r1 = double.TryParse(xaRoughness.Value, out roughness);
if (!r1)
throw new RoutingPreferenceDataException("Invalid roughness value: " + xaRoughness.Value + " in: " + segmentXElement.ToString());
if (roughness <= 0)
throw new RoutingPreferenceDataException("Invalid roughness value: " + xaRoughness.Value + " in: " + segmentXElement.ToString());
if (scheduleId == ElementId.InvalidElementId)
{
throw new RoutingPreferenceDataException("Cannot find Schedule: " + xaSchedule.Value + " in: " + segmentXElement.ToString()); //we will not create new schedules.
}
ElementId existingPipeSegmentId = GetSegmentByIds(materialId, scheduleId);
if (existingPipeSegmentId != ElementId.InvalidElementId)
return; //Segment found, no need to create.
ICollection<MEPSize> sizes = new List<MEPSize>();
foreach (XNode sizeNode in segmentXElement.Nodes())
{
if (sizeNode is XElement)
{
MEPSize newSize = ParseMEPSizeFromXml(sizeNode as XElement, m_document);
sizes.Add(newSize);
}
}
PipeSegment pipeSegment = PipeSegment.Create(m_document, materialId, scheduleId, sizes);
pipeSegment.Roughness = Convert.ConvertValueToFeet(roughness, m_document);
return;
}
/// <summary>
/// Create Xml from a PipeSegment
/// </summary>
/// <param name="pipeSegment"></param>
/// <returns></returns>
private XElement CreateXmlFromPipeSegment(PipeSegment pipeSegment)
{
XElement xPipeSegment = new XElement(XName.Get("PipeSegment"));
string segmentName = pipeSegment.Name;
xPipeSegment.Add(new XAttribute(XName.Get("pipeScheduleTypeName"), GetPipeScheduleTypeNamebyId(pipeSegment.ScheduleTypeId)));
xPipeSegment.Add(new XAttribute(XName.Get("materialName"), GetMaterialNameById(pipeSegment.MaterialId)));
double roughnessInDocumentUnits = Convert.ConvertValueDocumentUnits(pipeSegment.Roughness, m_document);
xPipeSegment.Add(new XAttribute(XName.Get("roughness"), roughnessInDocumentUnits.ToString("r") ));
foreach (MEPSize size in pipeSegment.GetSizes())
xPipeSegment.Add(CreateXmlFromMEPSize(size, m_document));
return xPipeSegment;
}
/// <summary>
/// Create an MEPSize from Xml
/// </summary>
/// <param name="sizeXElement"></param>
/// <param name="document"></param>
/// <returns></returns>
private static MEPSize ParseMEPSizeFromXml(XElement sizeXElement, Autodesk.Revit.DB.Document document)
{
XAttribute xaNominal = sizeXElement.Attribute(XName.Get("nominalDiameter"));
XAttribute xaInner = sizeXElement.Attribute(XName.Get("innerDiameter"));
XAttribute xaOuter = sizeXElement.Attribute(XName.Get("outerDiameter"));
XAttribute xaUsedInSizeLists = sizeXElement.Attribute(XName.Get("usedInSizeLists"));
XAttribute xaUsedInSizing = sizeXElement.Attribute(XName.Get("usedInSizing"));
double nominal, inner, outer;
bool usedInSizeLists, usedInSizing;
bool r1 = double.TryParse(xaNominal.Value, out nominal);
bool r2 = double.TryParse(xaInner.Value, out inner);
bool r3 = double.TryParse(xaOuter.Value, out outer);
bool r4 = bool.TryParse(xaUsedInSizeLists.Value, out usedInSizeLists);
bool r5 = bool.TryParse(xaUsedInSizing.Value, out usedInSizing);
if (!r1 || !r2 || !r3 || !r4 || !r5)
throw new RoutingPreferenceDataException("Cannot parse MEPSize attributes:" + xaNominal.Value + ", " + xaInner.Value + ", " + xaOuter.Value + ", " + xaUsedInSizeLists.Value + ", " + xaUsedInSizing.Value);
MEPSize newSize = null;
try
{
newSize = new MEPSize(Convert.ConvertValueToFeet(nominal, document), Convert.ConvertValueToFeet(inner, document), Convert.ConvertValueToFeet(outer, document), usedInSizeLists, usedInSizing);
}
catch (Exception)
{
throw new RoutingPreferenceDataException("Invalid MEPSize values: " + nominal.ToString() + ", " + inner.ToString() + ", " + outer.ToString());
}
return newSize;
}
/// <summary>
/// Create Xml from an MEPSize
/// </summary>
/// <param name="size"></param>
/// <param name="document"></param>
/// <returns></returns>
private static XElement CreateXmlFromMEPSize(MEPSize size, Autodesk.Revit.DB.Document document)
{
XElement xMEPSize = new XElement(XName.Get("MEPSize"));
xMEPSize.Add(new XAttribute(XName.Get("innerDiameter"), (Convert.ConvertValueDocumentUnits(size.InnerDiameter, document) ).ToString()));
xMEPSize.Add(new XAttribute(XName.Get("nominalDiameter"), (Convert.ConvertValueDocumentUnits(size.NominalDiameter, document) ).ToString()));
xMEPSize.Add(new XAttribute(XName.Get("outerDiameter"), (Convert.ConvertValueDocumentUnits(size.OuterDiameter, document) ).ToString()));
xMEPSize.Add(new XAttribute(XName.Get("usedInSizeLists"), size.UsedInSizeLists));
xMEPSize.Add(new XAttribute(XName.Get("usedInSizing"), size.UsedInSizing));
return xMEPSize;
}
/// <summary>
/// Populate a routing preference manager from Xml
/// </summary>
/// <param name="routingPreferenceManagerXElement"></param>
private void ParseRoutingPreferenceManagerFromXML(XElement routingPreferenceManagerXElement)
{
XAttribute xaPipeTypeName = routingPreferenceManagerXElement.Attribute(XName.Get("pipeTypeName"));
XAttribute xaPreferredJunctionType = routingPreferenceManagerXElement.Attribute(XName.Get("preferredJunctionType"));
PreferredJunctionType preferredJunctionType;
bool r1 = Enum.TryParse<PreferredJunctionType>(xaPreferredJunctionType.Value, out preferredJunctionType);
if (!r1)
throw new RoutingPreferenceDataException("Invalid Preferred Junction Type in: " + routingPreferenceManagerXElement.ToString());
ElementId pipeTypeId = GetPipeTypeByName(xaPipeTypeName.Value);
if (pipeTypeId == ElementId.InvalidElementId)
throw new RoutingPreferenceDataException("Could not find pipe type element in: " + routingPreferenceManagerXElement.ToString());
PipeType pipeType = m_document.GetElement(pipeTypeId) as PipeType;
RoutingPreferenceManager routingPreferenceManager = pipeType.RoutingPreferenceManager;
routingPreferenceManager.PreferredJunctionType = preferredJunctionType;
foreach (XNode xRule in routingPreferenceManagerXElement.Nodes())
{
if (xRule is XElement)
{
RoutingPreferenceRuleGroupType groupType;
RoutingPreferenceRule rule = ParseRoutingPreferenceRuleFromXML(xRule as XElement, out groupType);
routingPreferenceManager.AddRule(groupType, rule);
}
}
}
/// <summary>
/// Create Xml from a RoutingPreferenceManager
/// </summary>
/// <param name="routingPreferenceManager"></param>
/// <returns></returns>
private XElement CreateXmlFromRoutingPreferenceManager(RoutingPreferenceManager routingPreferenceManager)
{
XElement xRoutingPreferenceManager = new XElement(XName.Get("RoutingPreferenceManager"));
xRoutingPreferenceManager.Add(new XAttribute(XName.Get("pipeTypeName"), GetPipeTypeNameById(routingPreferenceManager.OwnerId)));
xRoutingPreferenceManager.Add(new XAttribute(XName.Get("preferredJunctionType"), routingPreferenceManager.PreferredJunctionType.ToString()));
for (int indexCrosses = 0; indexCrosses != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Crosses); indexCrosses++)
{
xRoutingPreferenceManager.Add(createXmlFromRoutingPreferenceRule(routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Crosses, indexCrosses), RoutingPreferenceRuleGroupType.Crosses));
}
for (int indexElbows = 0; indexElbows != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Elbows); indexElbows++)
{
xRoutingPreferenceManager.Add(createXmlFromRoutingPreferenceRule(routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Elbows, indexElbows), RoutingPreferenceRuleGroupType.Elbows));
}
for (int indexSegments = 0; indexSegments != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Segments); indexSegments++)
{
xRoutingPreferenceManager.Add(createXmlFromRoutingPreferenceRule(routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Segments, indexSegments), RoutingPreferenceRuleGroupType.Segments));
}
for (int indexJunctions = 0; indexJunctions != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Junctions); indexJunctions++)
{
xRoutingPreferenceManager.Add(createXmlFromRoutingPreferenceRule(routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Junctions, indexJunctions), RoutingPreferenceRuleGroupType.Junctions));
}
for (int indexTransitions = 0; indexTransitions != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Transitions); indexTransitions++)
{
xRoutingPreferenceManager.Add(createXmlFromRoutingPreferenceRule(routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Transitions, indexTransitions), RoutingPreferenceRuleGroupType.Transitions));
}
for (int indexUnions = 0; indexUnions != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.Unions); indexUnions++)
{
xRoutingPreferenceManager.Add(createXmlFromRoutingPreferenceRule(routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Unions, indexUnions), RoutingPreferenceRuleGroupType.Unions));
}
for (int indexMechanicalJoints = 0; indexMechanicalJoints != routingPreferenceManager.GetNumberOfRules(RoutingPreferenceRuleGroupType.MechanicalJoints); indexMechanicalJoints++)
{
xRoutingPreferenceManager.Add(createXmlFromRoutingPreferenceRule(routingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.MechanicalJoints, indexMechanicalJoints), RoutingPreferenceRuleGroupType.MechanicalJoints));
}
return xRoutingPreferenceManager;
}
/// <summary>
/// Create a RoutingPreferenceRule from Xml
/// </summary>
/// <param name="ruleXElement"></param>
/// <param name="groupType"></param>
/// <returns></returns>
private RoutingPreferenceRule ParseRoutingPreferenceRuleFromXML(XElement ruleXElement, out RoutingPreferenceRuleGroupType groupType)
{
XAttribute xaDescription = null;
XAttribute xaPartName = null;
XAttribute xaMinSize = null;
XAttribute xaMaxSize = null;
XAttribute xaGroup = null;
xaDescription = ruleXElement.Attribute(XName.Get("description"));
xaPartName = ruleXElement.Attribute(XName.Get("partName"));
xaGroup = ruleXElement.Attribute(XName.Get("ruleGroup"));
xaMinSize = ruleXElement.Attribute(XName.Get("minimumSize"));
ElementId partId;
bool r3 = Enum.TryParse<RoutingPreferenceRuleGroupType>(xaGroup.Value, out groupType);
if (!r3)
throw new RoutingPreferenceDataException("Could not parse rule group type: " + xaGroup.Value);
string description = xaDescription.Value;
if (groupType == RoutingPreferenceRuleGroupType.Segments)
partId = GetSegmentByName(xaPartName.Value);
else
partId = GetFittingByName(xaPartName.Value);
if (partId == ElementId.InvalidElementId)
throw new RoutingPreferenceDataException("Could not find MEP Part: " + xaPartName.Value + ". Is this the correct family name, and is the correct family loaded?");
RoutingPreferenceRule rule = new RoutingPreferenceRule(partId, description);
PrimarySizeCriterion sizeCriterion;
if (string.Compare(xaMinSize.Value, "All", true) == 0) //If "All" or "None" are specified, set min and max values to documented "Max" values.
{
sizeCriterion = PrimarySizeCriterion.All();
}
else if (string.Compare(xaMinSize.Value, "None", true) == 0)
{
sizeCriterion = PrimarySizeCriterion.None();
}
else // "maximumSize" attribute is only needed if not specifying "All" or "None."
{
try
{
xaMaxSize = ruleXElement.Attribute(XName.Get("maximumSize"));
}
catch (System.Exception)
{
throw new RoutingPreferenceDataException("Cannot get maximumSize attribute in: " + ruleXElement.ToString());
}
double min, max;
bool r1 = double.TryParse(xaMinSize.Value, out min);
bool r2 = double.TryParse(xaMaxSize.Value, out max);
if (!r1 || !r2)
throw new RoutingPreferenceDataException("Could not parse size values: " + xaMinSize.Value + ", " + xaMaxSize.Value);
if (min > max)
throw new RoutingPreferenceDataException("Invalid size range.");
min = Convert.ConvertValueToFeet(min, m_document);
max = Convert.ConvertValueToFeet(max, m_document);
sizeCriterion = new PrimarySizeCriterion(min, max);
}
rule.AddCriterion(sizeCriterion);
return rule;
}
/// <summary>
/// Create Xml from a RoutingPreferenceRule
/// </summary>
/// <param name="rule"></param>
/// <param name="groupType"></param>
/// <returns></returns>
private XElement createXmlFromRoutingPreferenceRule(RoutingPreferenceRule rule, RoutingPreferenceRuleGroupType groupType)
{
XElement xRoutingPreferenceRule = new XElement(XName.Get("RoutingPreferenceRule"));
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("description"), rule.Description));
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("ruleGroup"), groupType.ToString()));
if (rule.NumberOfCriteria >= 1)
{
PrimarySizeCriterion psc = rule.GetCriterion(0) as PrimarySizeCriterion;
if (psc.IsEqual(PrimarySizeCriterion.All()))
{
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("minimumSize"), "All"));
}
else
if (psc.IsEqual(PrimarySizeCriterion.None()))
{
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("minimumSize"), "None"));
}
else //Only specify "maximumSize" if not specifying "All" or "None" for minimum size, just like in the UI.
{
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("minimumSize"), (Convert.ConvertValueDocumentUnits(psc.MinimumSize, m_document)).ToString()));
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("maximumSize"), (Convert.ConvertValueDocumentUnits(psc.MaximumSize, m_document)).ToString()));
}
}
else
{
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("minimumSize"), "All"));
}
if (groupType == RoutingPreferenceRuleGroupType.Segments)
{
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("partName"), GetSegmentNameById(rule.MEPPartId)));
}
else
xRoutingPreferenceRule.Add(new XAttribute(XName.Get("partName"), GetFittingNameById(rule.MEPPartId)));
return xRoutingPreferenceRule;
}
#endregion
#region Accessors and finders
/// <summary>
/// Get PipeScheduleTypeName by Id
/// </summary>
/// <param name="pipescheduleTypeId"></param>
/// <returns></returns>
private string GetPipeScheduleTypeNamebyId(ElementId pipescheduleTypeId)
{
return m_document.GetElement(pipescheduleTypeId).Name;
}
/// <summary>
/// Get material name by Id
/// </summary>
/// <param name="materialId"></param>
/// <returns></returns>
private string GetMaterialNameById(ElementId materialId)
{
return m_document.GetElement(materialId).Name;
}
/// <summary>
/// Get segment name by Id
/// </summary>
/// <param name="segmentId"></param>
/// <returns></returns>
private string GetSegmentNameById(ElementId segmentId)
{
return m_document.GetElement(segmentId).Name;
}
/// <summary>
/// Get fitting name by Id
/// </summary>
/// <param name="fittingId"></param>
/// <returns></returns>
private string GetFittingNameById(ElementId fittingId)
{
FamilySymbol fs = m_document.GetElement(fittingId) as FamilySymbol;
return fs.Family.Name + " " + fs.Name;
}
/// <summary>
/// Get segment by Ids
/// </summary>
/// <param name="materialId"></param>
/// <param name="pipeScheduleTypeId"></param>
/// <returns></returns>
private ElementId GetSegmentByIds(ElementId materialId, ElementId pipeScheduleTypeId)
{
if ((materialId == ElementId.InvalidElementId) || (pipeScheduleTypeId == ElementId.InvalidElementId))
return ElementId.InvalidElementId;
Element material = m_document.GetElement(materialId);
Element pipeScheduleType = m_document.GetElement(pipeScheduleTypeId);
string segmentName = material.Name + " - " + pipeScheduleType.Name;
return GetSegmentByName(segmentName);
}
/// <summary>
/// Get pipe type name by Id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
private string GetPipeTypeNameById(ElementId id)
{
return m_document.GetElement(id).Name;
}
/// <summary>
/// Get segment by name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
private ElementId GetSegmentByName(string name)
{
foreach (Segment segment in m_segments)
if (segment.Name == name)
return segment.Id;
return ElementId.InvalidElementId;
}
/// <summary>
/// Get fitting by name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
private ElementId GetFittingByName(string name)
{
foreach (FamilySymbol fitting in m_fittings)
if ((fitting.Family.Name + " " + fitting.Name) == name)
return fitting.Id;
return ElementId.InvalidElementId;
}
/// <summary>
/// Get material by name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
private ElementId GetMaterialByName(string name)
{
foreach (Material material in m_materials)
if (material.Name == name)
return material.Id;
return ElementId.InvalidElementId;
}
/// <summary>
/// Get pipe schedule type by name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
private ElementId GetPipeScheduleTypeByName(string name)
{
foreach (PipeScheduleType pipeScheduleType in m_pipeSchedules)
if (pipeScheduleType.Name == name)
return pipeScheduleType.Id;
return ElementId.InvalidElementId;
}
/// <summary>
/// Get pipe type by name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
private ElementId GetPipeTypeByName(string name)
{
foreach (PipeType pipeType in m_pipeTypes)
if (pipeType.Name == name)
return pipeType.Id;
return ElementId.InvalidElementId;
}
/// <summary>
/// Update fittings list
/// </summary>
private void UpdateFittingsList()
{
m_fittings = GetAllFittings(m_document);
}
/// <summary>
/// Update segments list
/// </summary>
private void UpdateSegmentsList()
{
m_segments = GetAllPipeSegments(m_document);
}
/// <summary>
/// Update pipe types list
/// </summary>
private void UpdatePipeTypesList()
{
m_pipeTypes = GetAllPipeTypes(m_document);
}
/// <summary>
/// Update pipe type schedules list
/// </summary>
private void UpdatePipeTypeSchedulesList()
{
m_pipeSchedules = GetAllPipeScheduleTypes(m_document);
}
/// <summary>
/// Update materials list
/// </summary>
private void UpdateMaterialsList()
{
m_materials = GetAllMaterials(m_document);
}
/// <summary>
/// Get all pipe segments
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
public IEnumerable<PipeSegment> GetAllPipeSegments(Document document)
{
FilteredElementCollector fec = new FilteredElementCollector(document);
fec.OfClass(typeof(PipeSegment));
IEnumerable<PipeSegment> segments = fec.ToElements().Cast<PipeSegment>();
return segments;
}
/// <summary>
/// Get all fittings
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
public IEnumerable<FamilySymbol> GetAllFittings(Document document)
{
FilteredElementCollector fec = new FilteredElementCollector(document);
fec.OfClass(typeof(FamilySymbol));
fec.OfCategory(BuiltInCategory.OST_PipeFitting);
IEnumerable<FamilySymbol> fittings = fec.ToElements().Cast<FamilySymbol>();
return fittings;
}
/// <summary>
/// Get all materials
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
private IEnumerable<Material> GetAllMaterials(Document document)
{
FilteredElementCollector fec = new FilteredElementCollector(document);
fec.OfClass(typeof(Material));
IEnumerable<Material> materials = fec.ToElements().Cast<Material>();
return materials;
}
/// <summary>
/// Get all pipe schedule types
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
public IEnumerable<PipeScheduleType> GetAllPipeScheduleTypes(Document document)
{
FilteredElementCollector fec = new FilteredElementCollector(document);
fec.OfClass(typeof(Autodesk.Revit.DB.Plumbing.PipeScheduleType));
IEnumerable<Autodesk.Revit.DB.Plumbing.PipeScheduleType> pipeScheduleTypes = fec.ToElements().Cast<Autodesk.Revit.DB.Plumbing.PipeScheduleType>();
return pipeScheduleTypes;
}
/// <summary>
/// Get all pipe types
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
public IEnumerable<PipeType> GetAllPipeTypes(Document document)
{
ElementClassFilter ecf = new ElementClassFilter(typeof(PipeType));
FilteredElementCollector fec = new FilteredElementCollector(document);
fec.WherePasses(ecf);
IEnumerable<PipeType> pipeTypes = fec.ToElements().Cast<PipeType>();
return pipeTypes;
}
#endregion
}
}
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="RoutingPreferenceBuilder">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Family">
<xs:complexType>
<xs:attribute name="filename" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="PipeType">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="PipeScheduleType">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="PipeSegment">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="MEPSize">
<xs:complexType>
<xs:attribute name="innerDiameter" type="xs:decimal" use="required" />
<xs:attribute name="nominalDiameter" type="xs:decimal" use="required" />
<xs:attribute name="outerDiameter" type="xs:decimal" use="required" />
<xs:attribute name="usedInSizeLists" type="xs:boolean" use="required" />
<xs:attribute name="usedInSizing" type="xs:boolean" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="pipeScheduleTypeName" type="xs:string" use="required" />
<xs:attribute name="materialName" type="xs:string" use="required" />
<xs:attribute name="roughness" type="xs:decimal" use="required" />
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="RoutingPreferenceManager">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="RoutingPreferenceRule">
<xs:complexType>
<xs:attribute name="description" type="xs:string" use="required" />
<xs:attribute name="ruleGroup" type="xs:string" use="required" />
<xs:attribute name="minimumSize" type="xs:string" use="required" />
<xs:attribute name="maximumSize" type="xs:decimal" use="optional" />
<xs:attribute name="partName" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="pipeTypeName" type="xs:string" use="required" />
<xs:attribute name="preferredJunctionType" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="pipeSizeUnits" type="xs:string" use="required" />
<xs:attribute name="pipeRoughnessUnits" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
@@ -0,0 +1,252 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
using System.Xml.Linq;
using System.IO;
using System.Xml;
using System.Diagnostics;
using System.Xml.Schema;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
/// <summary>
/// A helper class to find paths of .rfa family files in a document.
/// </summary>
internal class FindFolderUtility
{
/// <summary>
/// Create an instance of the helper class
/// </summary>
public FindFolderUtility(Autodesk.Revit.ApplicationServices.Application application)
{
m_application = application;
m_basePath = GetFamilyBasePath();
List<string> extraFamilyPaths = FindFolderUtility.GetAdditionalFamilyPaths();
m_Familyfiles = new Dictionary<string, string>();
GetAllFiles(m_basePath, m_Familyfiles);
//Get additional .rfa files in user-defined paths specified in familypaths.xml
foreach (string extraPath in extraFamilyPaths)
{
GetAllFiles(extraPath, m_Familyfiles);
}
}
/// <summary>
/// Gets a list of paths defined in the familypaths.xml file in the RoutingPreferenceTools.dll folder.
/// </summary>
/// <returns>A list of paths containing .rfa files</returns>
public static List<string> GetAdditionalFamilyPaths()
{
List<string> pathsList = new List<string>();
StreamReader reader = null;
try
{
reader = new StreamReader(Directory.GetParent(System.Reflection.Assembly.GetExecutingAssembly().Location).FullName + "\\familypaths.xml");
}
catch (System.Exception)
{
return pathsList;
}
XDocument pathsDoc = XDocument.Load(new XmlTextReader(reader));
IEnumerable<XElement> paths = pathsDoc.Root.Elements("FamilyPath");
foreach (XElement xpath in paths)
try
{
XAttribute xaPath = xpath.Attribute(XName.Get("pathname"));
string familyPath = xaPath.Value;
pathsList.Add(familyPath);
}
catch (Exception)
{
}
reader.Close();
return pathsList;
}
/// <summary>
/// Returns the full path of an .rfa file in the "Data" directory of a Revit installation given an .rfa filename.
/// </summary>
/// <param name="filename">an .rfa filename without any path, e.g. "Generic elbow.rfa"</param>
/// <returns>The full path to the .rfa file</returns>
public string FindFileFolder(string filename)
{
string retval = "";
try
{
retval = m_Familyfiles[filename];
}
catch (KeyNotFoundException)
{
}
return retval;
}
private static void GetAllFiles(string basePath, Dictionary<string, string> allPaths)
{
if (!System.IO.Directory.Exists(basePath))
return;
string[] paths = (Directory.GetFiles(basePath, "*.rfa"));
foreach (string path in paths)
{
string filename = System.IO.Path.GetFileName(path);
allPaths[filename] = path;
}
string[] dirs = Directory.GetDirectories(basePath);
foreach (string dir in dirs)
{
GetAllFiles(dir, allPaths);
}
}
private string GetFamilyBasePath()
{
string basePath = "";
try
{
basePath = m_application.GetLibraryPaths()["Imperial Library"];
Debug.WriteLine(basePath);
if (basePath.EndsWith(@"\"))
{
basePath = basePath.Substring(0, basePath.Length - 1);
}
basePath = (System.IO.Directory.GetParent(basePath)).ToString();
if (!(string.IsNullOrEmpty(basePath)))
return basePath;
}
catch (Exception)
{
}
try
{
basePath = m_application.GetLibraryPaths().First().Value;
if (basePath.EndsWith(@"\"))
{
basePath = basePath.Substring(0, basePath.Length - 1);
}
basePath = System.IO.Directory.GetParent((System.IO.Directory.GetParent(basePath)).ToString()).ToString();
if (!(string.IsNullOrEmpty(basePath)))
return basePath;
}
catch (Exception)
{
}
try
{
string exe = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
basePath = System.IO.Directory.GetParent(System.IO.Path.GetDirectoryName(exe)).ToString();
}
catch (Exception)
{
}
return basePath;
}
private string m_basePath;
private Dictionary<string, string> m_Familyfiles;
private Autodesk.Revit.ApplicationServices.Application m_application;
}
/// <summary>
/// A simple exception class to help identify errors related to this application.
/// </summary>
internal class RoutingPreferenceDataException : System.Exception
{
public RoutingPreferenceDataException(string message)
{
m_message = message;
}
public override string ToString()
{
return m_message;
}
private string m_message;
}
/// <summary>
/// A helper class to validate RoutingPreferenceBuilder xml documents against
/// the embedded resource "RoutingPreferenceBuilderData.xsd"
/// </summary>
internal class SchemaValidationHelper
{
/// <summary>
/// Returns true if a document is a valid RoutingPreferenceBuilder xml document, false otherwise.
/// </summary>
public static bool ValidateRoutingPreferenceBuilderXml(XDocument doc, out string message)
{
message = "";
XmlSchemaSet schemas = new XmlSchemaSet();
schemas.Add("", XmlReader.Create(new StringReader(GetXmlSchema())));
try
{
doc.Validate(schemas, null);
return true;
}
catch (System.Xml.Schema.XmlSchemaValidationException ex)
{
message = ex.Message + ", " + ex.LineNumber + ", " + ex.LinePosition;
return false;
}
}
private static string GetXmlSchema()
{
//string[] names = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();
Stream schemaStream = null;
try
{
schemaStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Revit.SDK.Samples.RoutingPreferenceTools.CS.RoutingPreferenceBuilder.RoutingPreferenceBuilderData.xsd");
}
catch (Exception)
{
throw new Exception("Could not find embedded xml RotingPreferenceBuilder schema resource.");
}
if (schemaStream == null)
{
throw new Exception("Could not find embedded xml RotingPreferenceBuilder schema resource.");
}
System.IO.StreamReader stReader = new StreamReader(schemaStream);
return stReader.ReadToEnd();
}
}
}
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Text>RoutingPreferenceTools.Analyzer</Text>
<Assembly>D:\Revit\dev-0\ThirdParty\InstallerExtra\RevitSDK\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll</Assembly>
<ClientId>E6976BBA-FA1E-4F56-A178-A248B9AA9F81</ClientId>
<FullClassName>Revit.SDK.Samples.RoutingPreferenceTools.CS.Command</FullClassName>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
<AddIn Type="Command">
<Text>RoutingPreferenceTools.Builder.CommandReadPreferences</Text>
<Assembly>D:\Revit\dev-0\ThirdParty\InstallerExtra\RevitSDK\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll</Assembly>
<ClientId>E6976BBA-FA1E-4F56-A178-A248B9AA9F82</ClientId>
<FullClassName>Revit.SDK.Samples.RoutingPreferenceTools.CS.CommandReadPreferences</FullClassName>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
<AddIn Type="Command">
<Text>RoutingPreferenceTools.Builder.CommandWritePreferences</Text>
<Assembly>D:\Revit\dev-0\ThirdParty\InstallerExtra\RevitSDK\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll</Assembly>
<ClientId>E6976BBA-FA1E-4F56-A178-A248B9AA9F83</ClientId>
<FullClassName>Revit.SDK.Samples.RoutingPreferenceTools.CS.CommandWritePreferences</FullClassName>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
</RevitAddIns>
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7C33A55E-6044-48EE-A598-C4580D7C5DD3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.RoutingPreferenceTools.CS</RootNamespace>
<AssemblyName>RoutingPreferenceTools</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Debug\RoutingPreferenceTools.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\Debug\RoutingPreferenceTools.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System">
<Private>True</Private>
</Reference>
<Reference Include="System.Core">
<Private>True</Private>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq">
<Private>True</Private>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp">
<Private>True</Private>
</Reference>
<Reference Include="System.Data">
<Private>True</Private>
</Reference>
<Reference Include="System.Xml">
<Private>True</Private>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RoutingPreferenceAnalysis\Analyzer.cs" />
<Compile Include="RoutingPreferenceAnalysis\Command.cs" />
<Compile Include="RoutingPreferenceAnalysis\MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
</Compile>
<Compile Include="RoutingPreferenceAnalysis\PartIdInfo.cs" />
<Compile Include="RoutingPreferenceBuilder\CommandReadPreferences.cs" />
<Compile Include="RoutingPreferenceBuilder\CommandWritePreferences.cs" />
<Compile Include="RoutingPreferenceBuilder\RoutingPreferenceBuilder.cs" />
<Compile Include="RoutingPreferenceBuilder\RoutingPreferenceBuilderUtility.cs" />
<Compile Include="Utility.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="RoutingPreferenceAnalysis\MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="RoutingPreferenceBuilder\RoutingPreferenceBuilderData.xsd">
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(SolutionDir)VSProps\SDKSamples.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -0,0 +1,75 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK 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 BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, 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.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
namespace Revit.SDK.Samples.RoutingPreferenceTools.CS
{
internal class Validation
{
public static bool ValidateMep(Autodesk.Revit.ApplicationServices.Application application)
{
return application.IsPipingEnabled;
}
public static void MepWarning()
{
Autodesk.Revit.UI.TaskDialog.Show("RoutingPreferenceTools", "Revit MEP is required to run this addin.");
}
public static bool ValidatePipesDefined(Autodesk.Revit.DB.Document document)
{
FilteredElementCollector collector = new FilteredElementCollector(document);
collector.OfClass(typeof(Autodesk.Revit.DB.Plumbing.PipeType));
if (collector.Count() == 0)
return false;
else
return true;
}
public static void PipesDefinedWarning()
{
Autodesk.Revit.UI.TaskDialog.Show("RoutingPreferenceTools", "At least two PipeTypes are required to run this command. Please define another PipeType.");
}
}
internal class Convert
{
public static double ConvertValueDocumentUnits(double decimalFeet, Autodesk.Revit.DB.Document document)
{
FormatOptions formatOption = document.GetUnits().GetFormatOptions(SpecTypeId.PipeSize);
return UnitUtils.ConvertFromInternalUnits(decimalFeet, formatOption.GetUnitTypeId());
}
public static double ConvertValueToFeet(double unitValue, Autodesk.Revit.DB.Document document)
{
double tempVal = ConvertValueDocumentUnits(unitValue, document);
double ratio = unitValue / tempVal;
return unitValue * ratio;
}
}
}
@@ -0,0 +1,5 @@
<xml>
<!--- Extra optional paths where Revit should search for .rfa files -->
<FamilyPath pathname="C:\family files\"></FamilyPath>
<FamilyPath pathname="C:\family files2\"></FamilyPath>
</xml>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!--- Pipe size and roughness units of this document must match the corresponding units in the document. -->
<RoutingPreferenceBuilder pipeSizeUnits="DUT_FRACTIONAL_INCHES" pipeRoughnessUnits="DUT_DECIMAL_INCHES">
<!--- Declare all families to load. If a family already exists in the document, it will be ignored. -->
<Family filename="Cross - Generic.rfa" />
<Family filename="Elbow - Generic.rfa" />
<Family filename="Cap - Generic.rfa" />
<Family filename="Bend - PVC - Sch 40 - DWV.rfa" />
<Family filename="Coupling - PVC - Sch 40 - DWV.rfa" />
<Family filename="Wye 45 Deg Double - PVC - Sch 40 - DWV.rfa" />
<Family filename="Plug - PVC - Sch 40 - DWV.rfa" />
<Family filename="Tee Sanitary - PVC - Sch 40 - DWV.rfa" />
<Family filename="Coupling - Generic.rfa" />
<Family filename="Tee - Generic.rfa" />
<Family filename="Transition - Generic.rfa" />
<Family filename="Reducer - PVC - Sch 40 - DWV.rfa" />
<Family filename="Cross - Welded - Generic.rfa" />
<Family filename="Elbow - Welded - Generic.rfa" />
<Family filename="Tee - Welded - Generic.rfa" />
<Family filename="Transition - Welded - Generic.rfa"/>
<Family filename="Wye True - Flanged - GI - Class 250.rfa"/>
<Family filename="Tee Round Base - Flanged - GI - Class 250.rfa"/>
<Family filename="Coupling - PVC - Sch 40.rfa"/>
<Family filename="Flange - Weld Neck - Steel - Class 150.rfa"/>
<!--- Declare all new Pipe Types to create. If a pipe type already exists in the document, it will be ignored. -->
<PipeType name="AnotherPipeType" />
<!--- Declare all new Pipe Schedule Types to create. If a pipe schedule type already exists in the document, it will be ignored. -->
<PipeScheduleType name="Z"/>
<!--- Declare all new Pipe Segments to create using materials existing in the document and pipe schedule types that were declared above or already exist in the document. If a Pipe Segment type already exists in the document, it will be ignored. -->
<PipeSegment pipeScheduleTypeName="Z" materialName="Carbon Steel" roughness="0.0018">
<MEPSize innerDiameter="2.067" nominalDiameter="2" outerDiameter="2.375" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="2.469" nominalDiameter="2.5" outerDiameter="2.875" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="3.068" nominalDiameter="3" outerDiameter="3.5" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="3.548" nominalDiameter="3.5" outerDiameter="4" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="4.026" nominalDiameter="4" outerDiameter="4.5" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="5.047" nominalDiameter="5" outerDiameter="5.563" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="6.065" nominalDiameter="6" outerDiameter="6.625" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="7.981" nominalDiameter="8" outerDiameter="8.625" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="10.02" nominalDiameter="10" outerDiameter="10.75" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="11.938" nominalDiameter="12" outerDiameter="12.75" usedInSizeLists="true" usedInSizing="true" />
<MEPSize innerDiameter="13.126" nominalDiameter="14" outerDiameter="14" usedInSizeLists="true" usedInSizing="true" />
</PipeSegment>
<!--- Declare all new routing preferences rules to create using fittings, segments, and pipeTypes declared above or already included in the document. -->
<RoutingPreferenceManager pipeTypeName="AnotherPipeType" preferredJunctionType="Tee">
<RoutingPreferenceRule description="" ruleGroup="Elbows" minimumSize="All" partName="Elbow - Welded - Generic Standard" />
<RoutingPreferenceRule description="" ruleGroup="Segments" minimumSize="0.5" maximumSize="12" partName="Carbon Steel - Z" />
</RoutingPreferenceManager>
</RoutingPreferenceBuilder>