<?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 How to create image as parameter in a family in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-image-as-parameter-in-a-family/m-p/9489798#M34530</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am trying to add a new parameter to a family, in order to get that I do this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; var familySymbol = (FamilySymbol)annotation.ToList()?.First();
            var famDoc = this._uiDocument.Document.EditFamily(family.Family);
            using (var trans = new Transaction(famDoc))
            {
                trans.Start("Adding parameter");
                var parameterType = ParameterType.Image; 
                famDoc.FamilyManager.AddParameter("Symbol image", BuiltInParameterGroup.INVALID, parameterType,
                    true);
                trans.Commit();
            }&lt;/LI-CODE&gt;&lt;P&gt;But a error occurs,&amp;nbsp;&amp;nbsp;"Instance parameter of image type is not allowed."&lt;/P&gt;&lt;P&gt;Can I add a image as a parameter using Revit Api?&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 12:34:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-04T12:34:30Z</dc:date>
    <item>
      <title>How to create image as parameter in a family</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-image-as-parameter-in-a-family/m-p/9489798#M34530</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am trying to add a new parameter to a family, in order to get that I do this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; var familySymbol = (FamilySymbol)annotation.ToList()?.First();
            var famDoc = this._uiDocument.Document.EditFamily(family.Family);
            using (var trans = new Transaction(famDoc))
            {
                trans.Start("Adding parameter");
                var parameterType = ParameterType.Image; 
                famDoc.FamilyManager.AddParameter("Symbol image", BuiltInParameterGroup.INVALID, parameterType,
                    true);
                trans.Commit();
            }&lt;/LI-CODE&gt;&lt;P&gt;But a error occurs,&amp;nbsp;&amp;nbsp;"Instance parameter of image type is not allowed."&lt;/P&gt;&lt;P&gt;Can I add a image as a parameter using Revit Api?&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 12:34:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-image-as-parameter-in-a-family/m-p/9489798#M34530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-04T12:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create image as parameter in a family</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-image-as-parameter-in-a-family/m-p/9490272#M34531</link>
      <description>&lt;P&gt;The message is telling you that parameter types of ParameterType.Image can only be used for Type parameters, this is the same as in the UI. Therefore:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.AddParameter("Image 1", BuiltInParameterGroup.INVALID, ParameterType.Image, False)&lt;/P&gt;&lt;P&gt;Will work.&lt;/P&gt;&lt;P&gt;.AddParameter("Image 1", BuiltInParameterGroup.INVALID, ParameterType.Image, True)&lt;/P&gt;&lt;P&gt;Will not work.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 14:59:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-image-as-parameter-in-a-family/m-p/9490272#M34531</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-05-04T14:59:33Z</dc:date>
    </item>
  </channel>
</rss>

