<?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 Verify if a parameter is a shared parameter in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/verify-if-a-parameter-is-a-shared-parameter/m-p/5385767#M75052</link>
    <description>&lt;P&gt;In here, a piece of a code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach (Parameter param in elementType.Parameters) //Pega Type&lt;BR /&gt;{&lt;BR /&gt;if (param.Definition.Name == "CotaA")&lt;BR /&gt;{&lt;BR /&gt;trans.Start();&lt;BR /&gt;if ((CotaA != 0) &amp;amp;&amp;amp; (param.IsShared))&lt;BR /&gt;{&lt;BR /&gt;param.Set(CotaA);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;return Result.Failed;&lt;BR /&gt;trans.Commit();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and always fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to check if the parameter in revit "CotaA" is a Shared Parameter.&lt;/P&gt;&lt;P&gt;Tks.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Nov 2014 14:00:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-11-06T14:00:29Z</dc:date>
    <item>
      <title>Verify if a parameter is a shared parameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/verify-if-a-parameter-is-a-shared-parameter/m-p/5385767#M75052</link>
      <description>&lt;P&gt;In here, a piece of a code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach (Parameter param in elementType.Parameters) //Pega Type&lt;BR /&gt;{&lt;BR /&gt;if (param.Definition.Name == "CotaA")&lt;BR /&gt;{&lt;BR /&gt;trans.Start();&lt;BR /&gt;if ((CotaA != 0) &amp;amp;&amp;amp; (param.IsShared))&lt;BR /&gt;{&lt;BR /&gt;param.Set(CotaA);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;return Result.Failed;&lt;BR /&gt;trans.Commit();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and always fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to check if the parameter in revit "CotaA" is a Shared Parameter.&lt;/P&gt;&lt;P&gt;Tks.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2014 14:00:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/verify-if-a-parameter-is-a-shared-parameter/m-p/5385767#M75052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-06T14:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Verify if a parameter is a shared parameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/verify-if-a-parameter-is-a-shared-parameter/m-p/5391801#M75053</link>
      <description>&lt;P&gt;1. transaction need a name to start with, try trans.start("some action");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. if elementType is a FamilyInstance, then this should work, but if elementType is FamilyType, you should use FamilyManager to set the value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. can you make sure the paramater value type is same type of variable CotaA ? because you can not use a string value to set a parameter which is integer value.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2014 02:31:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/verify-if-a-parameter-is-a-shared-parameter/m-p/5391801#M75053</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-10T02:31:25Z</dc:date>
    </item>
  </channel>
</rss>

