<?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 Storage Type from BuiltInParameter in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900186#M30072</link>
    <description>&lt;P&gt;There are only 4 storage types in the same way there are only 3 subatomic particles (proton, neutron, electron).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Autodesk.Revit.DB.Level is a Class not a storage type.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Nov 2020 21:30:21 GMT</pubDate>
    <dc:creator>joshua.lumley</dc:creator>
    <dc:date>2020-11-27T21:30:21Z</dc:date>
    <item>
      <title>Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9899462#M30067</link>
      <description>&lt;P&gt;I would like to get the type of element that is stored in certain parameters.&lt;/P&gt;&lt;P&gt;At this point, I just have the BuiltInParameter. I do not have elements in the model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;BuiltInParameter.&lt;SPAN&gt;LEVEL_PARAM&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and I would like to get:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Level&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in order to create a collector like this: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;new FilteredElementCollector(doc).OfClass(typeof(Level))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 14:15:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9899462#M30067</guid>
      <dc:creator>franciscopossetto</dc:creator>
      <dc:date>2020-11-27T14:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900148#M30068</link>
      <description>&lt;P&gt;Did you mean you would like to get the elements which have the BuiltInParameter.LEVEL_PARAM parameter?&lt;/P&gt;&lt;P&gt;Could you rephrase the question.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 20:45:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900148#M30068</guid>
      <dc:creator>joshua.lumley</dc:creator>
      <dc:date>2020-11-27T20:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900153#M30069</link>
      <description>&lt;P&gt;Hi, Joshua.&lt;/P&gt;&lt;P&gt;I only need the type of object that will be stored in this parameter. In this sample, I add a collector because the next step that I want to do is check if certain parameter values exists in the model. I think the approach you mentioned in your reply could work as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 21:01:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900153#M30069</guid>
      <dc:creator>franciscopossetto</dc:creator>
      <dc:date>2020-11-27T21:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900163#M30070</link>
      <description>&lt;P&gt;Alright, this is easy enough, used a switch conditional..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;switch (myParameter.myStorageType) {
case StorageType.Double:
    break;
case StorageType.ElementId:
  break;
case StorageType.Integer:
  break;
case StorageType.None:
  break;
case StorageType.String:
  break;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 21:06:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900163#M30070</guid>
      <dc:creator>joshua.lumley</dc:creator>
      <dc:date>2020-11-27T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900175#M30071</link>
      <description>&lt;P&gt;I am using this enumeration, but the problem is when I have other types. For Example, for parameters that store Levels, The storage type that I expect is "Autodesk.Revit.DB.Level". Because this parameter will contain an element which has this type.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 21:21:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900175#M30071</guid>
      <dc:creator>franciscopossetto</dc:creator>
      <dc:date>2020-11-27T21:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900186#M30072</link>
      <description>&lt;P&gt;There are only 4 storage types in the same way there are only 3 subatomic particles (proton, neutron, electron).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Autodesk.Revit.DB.Level is a Class not a storage type.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 21:30:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900186#M30072</guid>
      <dc:creator>joshua.lumley</dc:creator>
      <dc:date>2020-11-27T21:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900190#M30073</link>
      <description>&lt;P&gt;Gotcha. Maybe I used the incorrect word to describe what I need to get.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 21:33:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900190#M30073</guid>
      <dc:creator>franciscopossetto</dc:creator>
      <dc:date>2020-11-27T21:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900249#M30074</link>
      <description>&lt;P&gt;If you are seeking what Element is the value of a parameter then the storage type will be ElementID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can't know what that value is until it is investigated. Sometimes you can make an educated guess by the form of BIP name. However beyond having a project containing everything possible and extracting class type names from elements associated with ElementIDs stored in parameters you can't know. That's a difficult task because you first have to know which built-in parameters are used in which element categories (if they are type or instance). Some BIP's are associated with multiple categories but you only have to find each BIP in one ElementType or Instance of one category.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the reson you need this information because perhaps there is a better approach where you don't need to know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 22:48:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9900249#M30074</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-11-27T22:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9903482#M30075</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the RevitAPI.chm, it says there is a Document.TypeOfStorage[BuiltInParameter] property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There you are.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 08:04:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9903482#M30075</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2020-11-30T08:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9912529#M30076</link>
      <description>&lt;P&gt;Thanks for your answer. I think my question was not correctly written. The Answer above describes what I was needing, and it looks like, what I am needing is not possible to get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 13:49:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9912529#M30076</guid>
      <dc:creator>franciscopossetto</dc:creator>
      <dc:date>2020-12-03T13:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get Storage Type from BuiltInParameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9912848#M30077</link>
      <description>&lt;P&gt;Another thing to consider is that Element is a base class for a lot of objects in the RevitAPI so you probably don't need it to be a Level until you know it is a Level i.e. you need to use it like a Level because Element doesn't have the member you require.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you wrote a function to return an Element from a parameter where the storage type is ElementID then that would cover a lot of things without casting to a subclass.&amp;nbsp; If you need to cast to a subclass it is because you know what subclass it is (in terms of how you want to use it).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is about presenting a list in a UI then use LabelUtils with the BuiltInParameter enum.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 15:33:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-storage-type-from-builtinparameter/m-p/9912848#M30077</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-12-03T15:33:14Z</dc:date>
    </item>
  </channel>
</rss>

