# Get Spec Type mit Codeblock or Python

**URL:** <https://forum.dynamobim.com/t/get-spec-type-mit-codeblock-or-python/108380>\
**Category:** Revit\
**Tags:** python\
**Created:** [February 27, 2025, 12:29pm UTC](https://forum.dynamobim.com/t/get-spec-type-mit-codeblock-or-python/108380 "2025-02-27T12:29:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [February 27, 2025, 3:38pm UTC](https://forum.dynamobim.com/t/get-spec-type-mit-codeblock-or-python/108380/4 "2025-02-27T15:38:39Z")

</div>

Hi,

Here are some examples

> [@String to Spec Type](https://forum.dynamobim.com/t/string-to-spec-type/95456/3):
>
> Hi, here is a solution with Python the input is a flat list of the Name of Parameter Type (Spec Type) : in English or in Revit Current language Python code (compatible to all engines) import clr import sys import System clr.AddReference("RevitAPI") import Autodesk from Autodesk.Revit.DB import \* clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentMana…

> [@Shared Parameters - Create and add to Family in Python](https://forum.dynamobim.com/t/shared-parameters-create-and-add-to-family-in-python/88081/14):
>
> Hi, here is a fix, (tested with Revit 2021, 2022, 2023) #Inspired by an archilab node, by Konrad Sobon #Modifications by Alban de Chasteigner 2020 # test fix by Cyril Poupin for Revit 2022+ #twitter : @geniusloci\_bim #geniusloci.bim@gmail.com #https://github.com/albandechasteigner/GeniusLociForDynamo import clr clr.AddReference("RevitAPI") import Autodesk from Autodesk.Revit.DB import \* clr.AddReference("RevitServices") import RevitServices from RevitServices.Pe…

> [@Dynamo 2.13 Get all Spec Types](https://forum.dynamobim.com/t/dynamo-2-13-get-all-spec-types/77477/2):
>
> Hi, here an example import clr import sys #import Revit API clr.AddReference('RevitAPI') import Autodesk from Autodesk.Revit.DB import \* prop\_infos = clr.GetClrType(SpecTypeId).GetProperties() dict\_forgeTypeId = {p.Name : p.GetGetMethod().Invoke(None, None) for p in prop\_infos} OUT = dict\_forgeTypeId there may be a simpler method without going through .Net reflection

---

_[View the full topic](https://forum.dynamobim.com/t/get-spec-type-mit-codeblock-or-python/108380)._
