<?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: Getting Shared Parameters for ViewSchedules in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8904129#M41118</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;First of all you should definitely try Revit Lookup so that you don't ask this type of questions anymore. Do it !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly when I do the same as you do I find the shared parameters in the ParameterSet returned by Sheet.Parameter. So you must have made a mistake in spelling or something this way (or the parameter is not bound to the sheets).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally you should consider the Parameter.Lookup method which is way faster than your foreach().&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Benoit&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2019 15:51:06 GMT</pubDate>
    <dc:creator>BenoitE&amp;A</dc:creator>
    <dc:date>2019-07-11T15:51:06Z</dc:date>
    <item>
      <title>Getting Shared Parameters for ViewSchedules</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8903823#M41117</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get the parameter definition for a shared parameter bound to a ViewSchedule however when I use the Parameters property it does not return any Shared Parameters, only internal parameters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ICollection&amp;lt;ViewSchedule&amp;gt; DeleteSchedules
            = new FilteredElementCollector(doc)
                .WhereElementIsNotElementType()
                .OfClass(typeof(ViewSchedule))&lt;BR /&gt;                .Cast&amp;lt;ViewSchedule&amp;gt;()
                .ToList();

            // Parameter definition for Retained_Sheet/View parameter
            Definition retainedSheetViewParamDef = null;

            if (DeleteSchedules.Count() &amp;gt;0)
            {
                ViewSchedule firstSchedule = DeleteSchedules.First();
                ParameterSet scheduleParamSet = firstSchedule.Parameters;
                
                foreach (Parameter p in scheduleParamSet)
                {
                    if (p.Definition.Name == "Retained_Sheet/View" &amp;amp;&amp;amp; p.IsShared)
                    {
                        retainedSheetViewParamDef = p.Definition;
                        break;
                    }
                }
            }&lt;/PRE&gt;&lt;P&gt;Confusingly, when I use the RevitLookup tool, I can see the Shared Parameter Definition within the Parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing anything?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 14:04:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8903823#M41117</guid>
      <dc:creator>kevin_fielding</dc:creator>
      <dc:date>2019-07-11T14:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Shared Parameters for ViewSchedules</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8904129#M41118</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;First of all you should definitely try Revit Lookup so that you don't ask this type of questions anymore. Do it !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly when I do the same as you do I find the shared parameters in the ParameterSet returned by Sheet.Parameter. So you must have made a mistake in spelling or something this way (or the parameter is not bound to the sheets).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally you should consider the Parameter.Lookup method which is way faster than your foreach().&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Benoit&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 15:51:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8904129#M41118</guid>
      <dc:creator>BenoitE&amp;A</dc:creator>
      <dc:date>2019-07-11T15:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Shared Parameters for ViewSchedules</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8904161#M41119</link>
      <description>&lt;P&gt;I mean this in the kindest sense, but did you read my post?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly, I am already using the RevitLookUp tool already to interrogate the schedules.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, I am looking at schedules i.e. ViewSchedule elements, and not sheets.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, I am using the foreach so I can be assured that I am selecting the shared parameter and not a non-shared project parameter by the same name. The Lookup method only selects the first parameter by that name which is risky.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your time to respond, however I have now resolved the issue. I need to filter out viewtemplates, and revision schedules.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ICollection&amp;lt;ViewSchedule&amp;gt; DeleteSchedules
            = new FilteredElementCollector(doc)
                .WhereElementIsNotElementType()
                .OfClass(typeof(ViewSchedule)).Cast&amp;lt;ViewSchedule&amp;gt;()
                .Where(k =&amp;gt; !k.IsTemplate &amp;amp;&amp;amp; !k.IsTitleblockRevisionSchedule &amp;amp;&amp;amp; !k.IsInternalKeynoteSchedule)
                .ToList();&lt;/PRE&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;k&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 16:02:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8904161#M41119</guid>
      <dc:creator>kevin_fielding</dc:creator>
      <dc:date>2019-07-11T16:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Shared Parameters for ViewSchedules</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8904207#M41120</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;Sorry I missed your final line under your code.&lt;/P&gt;&lt;P&gt;Glad you found it by yourself.&lt;/P&gt;&lt;P&gt;Benoit&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 16:17:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/getting-shared-parameters-for-viewschedules/m-p/8904207#M41120</guid>
      <dc:creator>BenoitE&amp;A</dc:creator>
      <dc:date>2019-07-11T16:17:06Z</dc:date>
    </item>
  </channel>
</rss>

