<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Element of ViewSchedule.GetTableData Row in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5916515#M69302</link>
    <description>&lt;P&gt;Oh, it just occurred to me that GetCellType returns CellType.Parameter because it&amp;nbsp;&lt;EM&gt;is&lt;/EM&gt; a parameter in the cell, duh. I was thinking of it as the type of what the parameter is&amp;nbsp;&lt;EM&gt;holding or the type of the data that is displayed in the column &lt;/EM&gt;which&amp;nbsp;in this case my parameter was set up as&amp;nbsp;&lt;EM&gt;Text.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is of course neither here nor there. I still need to understand what I'm doing wrong in general with my code as I'm unable to get the UniqueId &lt;EM&gt;back out&lt;/EM&gt; of the TableData row that I wrote it into.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2015 19:48:54 GMT</pubDate>
    <dc:creator>DJB_CADfx</dc:creator>
    <dc:date>2015-11-19T19:48:54Z</dc:date>
    <item>
      <title>Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5907290#M69295</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ViewSchedule.GetTableData method&amp;nbsp;allows you to get at the data in an existing schedule. However, the problem we are running into is how to determine what Element each row in the SectionType.Body of the TableData applies to? Is there a way when running through the TableData to determine the&amp;nbsp;Element each row is refering to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dave Blackburn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2015 17:33:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5907290#M69295</guid>
      <dc:creator>DJB_CADfx</dc:creator>
      <dc:date>2015-11-13T17:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5908255#M69296</link>
      <description>&lt;P&gt;I've struggled with this also, and as far as I know you cannot get this directly from the schedule. &amp;nbsp;But there is a workaround. &amp;nbsp;You can do a FilteredElementCollector of the schedule using its ElementId for the view input. &amp;nbsp;So now you know what elements can be shown in the schedule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that schedules can be filtered, sorted, and not itemized. &amp;nbsp;(If the schedule is not itemized you are effectively looking at multiple elements in a single row.) &amp;nbsp;So what I ended up doing was creating an ID text parameter for the category (or all categories). &amp;nbsp;Add the ID parameter to your schedule and set the IsItemized to true. &amp;nbsp;As you iterate over the elements in your FEC, set the ID. &amp;nbsp;(Since we can't add the ElementId param to a schedule.) &amp;nbsp;Now you can get the ID for each row in the schedule to know what element it was.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Nov 2015 16:00:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5908255#M69296</guid>
      <dc:creator>RevitArkitek</dc:creator>
      <dc:date>2015-11-14T16:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5909373#M69297</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see also:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/revit-api/quick-way-of-counting-rows-in-a-schedule/m-p/5800112/highlight/true#M11603" target="_blank"&gt;http://forums.autodesk.com/t5/revit-api/quick-way-of-counting-rows-in-a-schedule/m-p/5800112/highlight/true#M11603&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact, the workaround wouldn't be necessary if Autodesk would just provide a simple TabelSectionData.GetRowElementId(int rowIndex) method...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 08:52:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5909373#M69297</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-11-16T08:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5909690#M69298</link>
      <description>&lt;P&gt;Or in the case of un-itemized schedules, a list of ElementIds. &amp;nbsp;I think the API engineers have been asleep the last couple of versions. &amp;nbsp;We only seem to get the new Revit features or this useless Revit Server stuff.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 13:04:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5909690#M69298</guid>
      <dc:creator>RevitArkitek</dc:creator>
      <dc:date>2015-11-16T13:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5914290#M69299</link>
      <description>&lt;P&gt;I understand the concept here, but have run into problems on the execution. Can either of you offer some help? Here is what I have working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Create new parameter that is associated with the same Category as the elements in the schedule&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Run through all elements and set the value of this parameter to each element's UniqueId&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Locate this new SchedulableField from the ViewSchedule.Definition.GetSchedulableFields using the name of my new parameter&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Insert&amp;nbsp;this new SchedulableField into the ViewSchedule.Definition&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;The problem arises when I attempt to find the element of the row in the TableData -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Step through body section of TableData from ViewSchedule.GetTableData&lt;/LI&gt;&lt;LI&gt;Get ParamId from cell in current row: var paramId = bodySection.GetCellParamId( iBodyRow, 0 );&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Get the value from the parameter to see if it is the UniqueId of the element being searched for&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Step 2 &amp;amp; 3 are the problems. GetCellParamId returns an ElementId. I can open that element via document.GetElement and it appears to be my parameter (at least it has the same name as my parameter), but I didn't think Parameters &lt;EM&gt;were&lt;/EM&gt; Elements so I'm really confused why GetCellParamId is returning an ElementId. In any case, I can't convert that element to a Parameter in order to get at the UniqueID stored in its value. What am I missing here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Thanks for any help you can offer!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 18:19:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5914290#M69299</guid>
      <dc:creator>DJB_CADfx</dc:creator>
      <dc:date>2015-11-18T18:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5915204#M69300</link>
      <description>&lt;P&gt;Hi djb,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that's the point: the Parameter object is not an Element.&lt;/P&gt;&lt;P&gt;If you can get a valid Element by document.GetElement(parameterId) of the same name as the parameter itself, this one seems to be some sort of helper element but not your desired one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is still the result:&lt;/P&gt;&lt;P&gt;There is no way to get the Id or UniqueId from a row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As both RevitArkitek and I suggested, there is only an ugly workaround by adding the Element's Id.IntegerValue (or GUID) to the schedule's columns.&lt;/P&gt;&lt;P&gt;You can do that in a temporary transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 09:20:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5915204#M69300</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-11-19T09:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5916385#M69301</link>
      <description>&lt;P&gt;Thanks for replying Revitalizer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had encountered your other post regarding this same thing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Hi tssserg,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;first, I set the existing value for element parameter BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS to oldvalue + mySeparatorSign + elementId.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Then I duplicate an existing ViewSchedule.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;If it doesn't contain a ScheduleField for the parameter yet, I add this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;After that, I can analyze each row, splitting the value of the comments cell by mySeparatorSign to get the ElementId.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Finally, I rollback the Transaction.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;In fact, I used two Transactions inside a TransactionGroup.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;That's all.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Of course you could add another parameter to hold the ElementId.IntegerValue and use this one instead of hijacking the comments parameter.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;So I was taking the route of creating my own parameter to hold the Element.UniqueId. Are you saying I can't use a new parameter in this way and add it to the Schedule as a column? (The new parameter type I created was of ParameterType.Text, so I'm not sure why when I check the bodySection.GetCellType() for this new column it returns CellType.Parameter, but it does.)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Here is the code that creates the parameter, fills it with each element's UniqueId and inserts it as a new field in the schedule:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;public static ViewSchedule createTempSchedule( ViewSchedule origVs, int scheduleFieldIdInt, out Guid idParamGuid, out ScheduleField vsSF )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; Document doc = origVs.Document;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; idParamGuid = Guid.Empty;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; vsSF = null;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; //duplicate the schedule so that the original is not modified&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; ElementId newVsId = origVs.Duplicate( ViewDuplicateOption.Duplicate );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; ViewSchedule vs = doc.GetElement( newVsId ) as ViewSchedule;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; //get the category&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; CategorySet cs = new CategorySet();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; Category cat = doc.Settings.Categories.get_Item( (BuiltInCategory)vs.Definition.CategoryId.IntegerValue );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; cs.Insert( cat );&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; //take the first element of the schedule's category and either get or create the uniqueId parameter&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; string uniqueIdParamName = "Schedule_Unique_Id";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; FilteredElementCollector catFec = new FilteredElementCollector( doc ).&lt;/FONT&gt;&lt;FONT color="#800080"&gt;OfCategory( (BuiltInCategory)cat.Id.IntegerValue).WhereElementIsNotElementType();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; Element testElem = catFec.ToList&amp;lt;Element&amp;gt;()[ 0 ];&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; if (testElem.get_Parameter( uniqueIdParamName ) == null)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; idParamGuid = RawCreateProjectParameter( doc.Application, uniqueIdParamName, ParameterType.Text,&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#800080"&gt;false, cs, BuiltInParameterGroup.PG_TEXT, true );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; idParamGuid = testElem.get_Parameter( uniqueIdParamName ).GUID;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; foreach (Element elem in catFec)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elem.get_Parameter( idParamGuid ).Set( elem.UniqueId );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; //add uniqueId to the schedule as a new field (column)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; SchedulableField ableSf = null;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; foreach (SchedulableField thisSf in vs.Definition.GetSchedulableFields())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (thisSf.GetName( doc ).Equals( uniqueIdParamName ))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ableSf = thisSf;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; if (ableSf == null) //extra precaution&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaskDialog.Show( "Revit", "Didn't find new idParam as Schedulable Field" );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; try&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vs.Definition.InsertField(( ableSf, 0 );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; catch { }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; //remove all other fields except the one with the calculated value in it&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; for (int i = vs.Definition.GetFieldCount() - 1; i &amp;gt; 0; i--)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ScheduleField sf = vs.Definition.GetField( i );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sf.FieldId.IntegerValue.Equals( scheduleFieldIdInt ))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vsSF = sf;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vs.Definition.RemoveField( sf.FieldId );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; vs.RefreshData();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&amp;nbsp; &amp;nbsp; return vs;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 18:52:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5916385#M69301</guid>
      <dc:creator>DJB_CADfx</dc:creator>
      <dc:date>2015-11-19T18:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5916515#M69302</link>
      <description>&lt;P&gt;Oh, it just occurred to me that GetCellType returns CellType.Parameter because it&amp;nbsp;&lt;EM&gt;is&lt;/EM&gt; a parameter in the cell, duh. I was thinking of it as the type of what the parameter is&amp;nbsp;&lt;EM&gt;holding or the type of the data that is displayed in the column &lt;/EM&gt;which&amp;nbsp;in this case my parameter was set up as&amp;nbsp;&lt;EM&gt;Text.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is of course neither here nor there. I still need to understand what I'm doing wrong in general with my code as I'm unable to get the UniqueId &lt;EM&gt;back out&lt;/EM&gt; of the TableData row that I wrote it into.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 19:48:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5916515#M69302</guid>
      <dc:creator>DJB_CADfx</dc:creator>
      <dc:date>2015-11-19T19:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5936708#M69303</link>
      <description>Hey Revitalizer, Just got back from the holiday &amp;amp; wondered if you happened to see my follow-up post directed at your method of resolving this issue?</description>
      <pubDate>Fri, 04 Dec 2015 18:28:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5936708#M69303</guid>
      <dc:creator>DJB_CADfx</dc:creator>
      <dc:date>2015-12-04T18:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5938836#M69304</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, I did so, but I hadn't time (and will) to look after it yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 10:25:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5938836#M69304</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-12-07T10:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get Element of ViewSchedule.GetTableData Row</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5950952#M69305</link>
      <description>&lt;P&gt;Well I solved my problems although I'm not 100% sure why I had the problems, but here was the cause:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ViewSchedule vsTemp = createTempSchedule( vs, kvp.Key, out idParamGuid, out targetFieldCol, out vsSF );&lt;BR /&gt;var tblData = vsTemp.GetTableData();&lt;BR /&gt;var bodySection = tblData.GetSectionData( SectionType.Body );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was using methods off of the bodySection variable above which yeilds different results than methods off of the ViewSchedule for the bodySection.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;So this&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; bodySection.GetCellText( iBodyRow, bodySection.FirstColumnNumber );&lt;/P&gt;&lt;P&gt;yields different results than&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; vsTemp.GetCellText( SectionType.Body, iBodyRow, bodySection.FirstColumnNumber );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(The last&amp;nbsp;line&amp;nbsp;above is the one that works correctly.)&lt;/P&gt;&lt;P&gt;Several other methods off of bodySection yielded results that I found unexpected, and caused all kinds of trouble for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 20:11:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-element-of-viewschedule-gettabledata-row/m-p/5950952#M69305</guid>
      <dc:creator>DJB_CADfx</dc:creator>
      <dc:date>2015-12-14T20:11:05Z</dc:date>
    </item>
  </channel>
</rss>

