{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab420{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fnil\fprq1\fcharset0 Fixedsys;}} {\colortbl ;\red0\green0\blue255;\red1\green0\blue1;} {\info{\horzdoc}{\*\lchars ([\'7b}{\*\fchars !),.:\'3b?D]\'7d}} \viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 PanelSchedule\line\b Revit Platform:\b0 MEP\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2011\f1 .0\f0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Data Exchange\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Show how the Panel Schedule API works.\line\b Summary:\b0 \line This sample contains 3 external commands to show how to use the Panel Schedule API:\par \pard\ltrpar\nowidctlpar\fi-360\li720 1.\tab PanelScheduleExport - gets the panel schedule view data via the API and generates a CSV file or a HTML page for it.\par 2.\tab InstanceViewCreation - Create a panel schedule view instance for an electrical panel you selected.\par 3.\tab SheetImport - Place the panel schedule view(s) on a sheet view.\par \pard\ltrpar\nowidctlpar\f1\par \f0\par \b Classes:\b0 \f1\par \pard\ltrpar\nowidctlpar\fi360\f0 Autodesk.Revit.DB.Electrical.PanelScheduleView\par Autodesk.Revit.DB.Electrical.PanelScheduleSheetInstance\par Autodesk.Revit.DB.SectionType\par Autodesk.Revit.DB.TableSectionData\f1\par \pard\ltrpar\nowidctlpar\f0\par \b Project Files:\b0\i \cf1\i0\f1\par \pard\ltrpar\nowidctlpar\tx720\cf0\f0 CSVTranslator.cs\f1\par \pard\ltrpar\nowidctlpar\li420\tx720\f0 It contains the class CSVTranslator which is responsible for translating the panel schedule view data from Revit to .CSV format.\f1\par \pard\ltrpar\nowidctlpar\tx720\f0 HTMLTranslator.cs\f1\par \pard\ltrpar\nowidctlpar\li420\tx720\f0 It contains the class HTMLTranslator which is responsible for translating the panel schedule view data from Revit to HTML table.\f1\par \pard\ltrpar\nowidctlpar\f0 InstanceViewCreation.cs\par \pard\ltrpar\nowidctlpar\li420 It contains the class InstanceViewCreation to show how to create a panel schedule for an electrical panel by using the PanelSceduleView.CreateInstanceView API\par \pard\ltrpar\nowidctlpar SheetImport.cs\par \pard\ltrpar\nowidctlpar\li420 It contains the class SheetImport to show how to place the panel schedule view(s) (using a \cf2\lang1024\f2 PanelScheduleSheetInstance) \cf0\lang1033\f0 on a sheet view.\par \pard\ltrpar\nowidctlpar\par \par \b Description:\b0 \f1\par \f0 Functionalities:\par \pard\ltrpar\nowidctlpar\fi-420\li780\tx780 -\tab Export Revit panel schedule view(s) to HTML page(s).\par -\tab Create a panel schedule view for an electrical panel you selected.\par -\tab Place the panel schedule view(s) on a sheet view.\par \f1\par \pard\ltrpar\nowidctlpar\f0 Implements:\par Command PanelScheduleExport:\f1\par \pard\ltrpar\nowidctlpar\fi-420\li780\tx780\f0 -\tab Get all PanelScheduleView instances by ElementClassFilter.\par -\tab Ignore the PanelScheduleView instance which is a template.\par -\tab Get all the table cells by API PanelScheduleView.GetCellText(sectionType, ii, jj);\par -\tab Export the table to a 'table' node in HTML or comma delimited.\f1\par \pard\ltrpar\nowidctlpar\f0 Command InstanceViewCreation:\f1\par \pard\ltrpar\nowidctlpar\fi-420\li780\tx780\f0 -\tab Get one electrical panel by Selection.PickObject(ObjectType.Element).\par -\tab Create instance view by PanelScheduleView.CreateInstanceView(doc, selectedPanel.Element.Id).\f1\par \pard\ltrpar\nowidctlpar\par \f0 Command SheetImport:\f1\par \pard\ltrpar\nowidctlpar\fi-420\li780\tx780\f0 -\tab Get one sheet view by doc.ActiveView.\par -\tab Place the panel schedule view on the sheet view by PanelScheduleSheetInstance.Create(doc, psView.Id, sheet).\f1\par \pard\ltrpar\nowidctlpar\f0\par \b Instructions:\cf1\b0 \par \cf0 Command PanelScheduleExport:\par \pard\ltrpar\nowidctlpar\fi-360\li720\tx360 1.\tab Run Revit MEP 2011.\par \pard\ltrpar\nowidctlpar\fi-360\li720 2.\tab Make sure the \lquote template.html\rquote file is in the same folder as the external command assembly.\par 3.\tab Run this external command.\par 4.\tab It generates one CSV file or HTML page for each panel schedule view instance in the Revit document.\par \pard\ltrpar\nowidctlpar\par Command InstanceViewCreation:\par \pard\ltrpar\nowidctlpar\fi-360\li720\tx360 1.\tab Run Revit MEP 2011.\par \pard\ltrpar\nowidctlpar\fi-360\li720 2.\tab Switch to a view containing an electrical Panel. \par 3.\tab Run this external command.\par 4.\tab Select one electrical panel.\par 5.\tab It creates an instance view for the electrical panel you selected.\par \pard\ltrpar\nowidctlpar\par Command SheetImport:\par \pard\ltrpar\nowidctlpar\fi-360\li720\tx360 1.\tab Run Revit MEP 2011.\par \pard\ltrpar\nowidctlpar\fi-360\li720 2.\tab Create or open one Sheet view.\par 3.\tab Run this external command.\par 4.\tab It places the panel schedule view(s) on the sheet view.\par }