<?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: Shared parameter to schedulable field in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7315558#M56666</link>
    <description>&lt;P&gt;To add a shared parameter to a schedule:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;SharedParameterElement shParamElem = SharedParameterElement.Lookup(document, paramGUID);
ScheduleField mnamefield = msd.AddField(new SchedulableField(ScheduleFieldType.Instance, shParamElem.Id));
&lt;/PRE&gt;
&lt;P&gt;So the question is, how do you get a SharedParameterElement into the document.&lt;/P&gt;
&lt;P&gt;There are 2 possibilities:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;loading a family&amp;nbsp;that contains&amp;nbsp;the shared parameter.&lt;/LI&gt;
&lt;LI&gt;defining a project parameter.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Once the parameter is loaded into the document, you can delete the family or projectparameter (Binding) that you used to create the SharedParameterElement. The SharedParameterElement will remain in the document.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Aug 2017 11:01:20 GMT</pubDate>
    <dc:creator>FAIR59</dc:creator>
    <dc:date>2017-08-21T11:01:20Z</dc:date>
    <item>
      <title>Shared parameter to schedulable field</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7303231#M56663</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible through the API to add columns to a schedule directly from a shared parameter files without creating a project parameter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that I can add Built in Parameters&lt;/P&gt;&lt;PRE&gt;ScheduleDefinition msd = mvs.Definition;
schedulableFields=msd.GetSchedulableFields();
ScheduleField mnamefield = msd.AddField(new SchedulableField(ScheduleFieldType.Instance, new ElementId(BuiltInParameter.ALL_MODEL_MARK)));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that I can search for specific text strings&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IList&amp;lt;SchedulableField&amp;gt; schedulableFields = viewSched.Definition.GetSchedulableFields();

		SchedulableField field0 = schedulableFields.Where(sf =&amp;gt; sf.GetName(doc) == "NameOfParameter").FirstOrDefault();
		ScheduleField scheduleField0 = viewSched.Definition.AddField(field0);&lt;/PRE&gt;&lt;P&gt;The idea would be to create the full version of the schedule possibly before the families with all the parameters have been added to the project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 00:00:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7303231#M56663</guid>
      <dc:creator>will.wydock</dc:creator>
      <dc:date>2017-08-16T00:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Shared parameter to schedulable field</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7303649#M56664</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Wwydock,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I cannot answer in full, lacking the required product knowledge.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What I can tell you:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;There is currently no API access to create project parameters.&lt;/LI&gt;
&lt;LI&gt;If you can achieve what you want through the user interface, it is probably possible programmatically as well (as long as you honour item 1).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 06:19:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7303649#M56664</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-08-16T06:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Shared parameter to schedulable field</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7308424#M56665</link>
      <description>&lt;P&gt;Right now I am looking at Revit 2015-17 but am upgrading to 18. I am not looking to create a project parameter just add a shared parameter &amp;nbsp;to the a schedule as show as below and then eventually apply formatting and grouping.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/390575iC0951EAA59F402AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 15:53:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7308424#M56665</guid>
      <dc:creator>will.wydock</dc:creator>
      <dc:date>2017-08-17T15:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Shared parameter to schedulable field</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7315558#M56666</link>
      <description>&lt;P&gt;To add a shared parameter to a schedule:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;SharedParameterElement shParamElem = SharedParameterElement.Lookup(document, paramGUID);
ScheduleField mnamefield = msd.AddField(new SchedulableField(ScheduleFieldType.Instance, shParamElem.Id));
&lt;/PRE&gt;
&lt;P&gt;So the question is, how do you get a SharedParameterElement into the document.&lt;/P&gt;
&lt;P&gt;There are 2 possibilities:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;loading a family&amp;nbsp;that contains&amp;nbsp;the shared parameter.&lt;/LI&gt;
&lt;LI&gt;defining a project parameter.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Once the parameter is loaded into the document, you can delete the family or projectparameter (Binding) that you used to create the SharedParameterElement. The SharedParameterElement will remain in the document.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 11:01:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/shared-parameter-to-schedulable-field/m-p/7315558#M56666</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2017-08-21T11:01:20Z</dc:date>
    </item>
  </channel>
</rss>

