# How to retrieve project information parameters?

**URL:** <https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423>\
**Category:** Developers\
**Tags:** python\
**Created:** [December 14, 2017, 3:41pm UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423 "2017-12-14T15:41:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge\_Villarroel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jorge_villarroel/32/23619_2.png) [@Jorge\_Villarroel](https://forum.dynamobim.com/u/Jorge_Villarroel)\
**Post date:** [December 14, 2017, 3:41pm UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/1 "2017-12-14T15:41:08Z")

</div>

Hi All,

I’m trying to get a value from a Project parameter but I don’t quite understand how to do it. If some could give me some directions, I’ll appreciate it.

```
import clr

clr.AddReference('ProtoGeometry')
import Autodesk.DesignScript.Geometry
from Autodesk.DesignScript.Geometry import *

clr.AddReference('DSCoreNodes')
from DSCore import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager

#The inputs to this node will be stored as a list in the IN variables.
input = IN[0]

doc = DocumentManager.Instance.CurrentDBDocument

ProyInfo = UnwrapElement(doc.ProjectInformation)

ruta = ProyInfo.GetParameterValueByName("Parameter Name")

#Assign your output to the OUT variable.
OUT = ruta 

```

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [December 14, 2017, 3:53pm UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/2 "2017-12-14T15:53:21Z")

</div>

Hi @Jorge_Villarroel

I think clockwork package has already node called “Document.ProjectParameters” it will retrieve all project parameters and the categories they are assigned to.

And also Document.ProjectInfo node.

---

<div class="post-metadata">

**Author:** ![Milorad\_Lazicic](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/milorad_lazicic/32/18280_2.png) [@Milorad\_Lazicic](https://forum.dynamobim.com/u/Milorad_Lazicic)\
**Post date:** [December 19, 2017, 10:57am UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/3 "2017-12-19T10:57:46Z")

</div>

Hi Jorge,  
maybe this can help you:

```
import clr

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument

OUT = []

project_info_collector = FilteredElementCollector(doc) \
                        .OfCategory(BuiltInCategory.OST_ProjectInformation) \
                        .ToElements()

for i in project_info_collector:
	project_name_param = i.LookupParameter('Project Name')
	if project_name_param:
		project_name = project_name_param.AsString()
		OUT.Add(project_name)
	
	project_number_param = i.LookupParameter('Project Number')
	if project_number_param:
		project_number = project_number_param.AsString()
		OUT.Add(project_number)
	else:
		OUT.Add("Perameter not found")

```

You should first collect the built-in category **OST\_ProjectInformation** and then look for the certain parameter (in this case **Project Name** and **Project Number** )

Cheers, Milorad

---

<div class="post-metadata">

**Author:** ![Jorge\_Villarroel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jorge_villarroel/32/23619_2.png) [@Jorge\_Villarroel](https://forum.dynamobim.com/u/Jorge_Villarroel)\
**Post date:** [December 19, 2017, 11:57am UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/4 "2017-12-19T11:57:07Z")

</div>

Thanks @Milorad_Lazicic. I’ll give it a try!

---

<div class="post-metadata">

**Author:** ![BenRobinson\_HB](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@BenRobinson\_HB](https://forum.dynamobim.com/u/BenRobinson_HB)\
**Post date:** [March 15, 2019, 4:23pm UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/5 "2019-03-15T16:23:29Z")

</div>

You can just do  
doc = DocumentManager.Instance.CurrentDBDocument

projectInfo = doc.ProjectInformation

projectName = projectInfo.Name  
ProjectNumber = projectInfo.Number

---

<div class="post-metadata">

**Author:** ![Arno\_De\_Lange](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arno_de_lange/32/35178_2.png) [@Arno\_De\_Lange](https://forum.dynamobim.com/u/Arno_De_Lange)\
**Post date:** [February 25, 2021, 10:37am UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/6 "2021-02-25T10:37:38Z")

</div>

i am trying to adjust the code so i get all the parameters available in project information… but i keep hitting a errror…

---

<div class="post-metadata">

**Author:** ![Jannis](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@Jannis](https://forum.dynamobim.com/u/Jannis)\
**Post date:** [March 5, 2021, 9:49am UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/7 "2021-03-05T09:49:44Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/e/6eebc0422f0bf63beeac006fb1bdf258ee74bccd.png)

Clockwork has the solution to your problem 🙂

---

<div class="post-metadata">

**Author:** ![ReggieB](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@ReggieB](https://forum.dynamobim.com/u/ReggieB)\
**Post date:** [June 6, 2022, 3:36am UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/8 "2022-06-06T03:36:48Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/3/1382577be4f24478f2378fa340b29c4e84079cbd.png)  
This should be enough if you use pure Dynamo.

---

<div class="post-metadata">

**Author:** ![JulioPolo](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@JulioPolo](https://forum.dynamobim.com/u/JulioPolo)\
**Post date:** [February 15, 2023, 4:11pm UTC](https://forum.dynamobim.com/t/how-to-retrieve-project-information-parameters/17423/9 "2023-02-15T16:11:59Z")

</div>

> [@Milorad\_Lazicic](#):
>
> ```auto
> import clr
> 
> clr.AddReference("RevitNodes")
> import Revit
> clr.ImportExtensions(Revit.Elements)
> 
> clr.AddReference("RevitServices")
> import RevitServices
> from RevitServices.Persistence import DocumentManager
> doc = DocumentManager.Instance.CurrentDBDocument
> 
> clr.AddReference("RevitAPI")
> import Autodesk
> from Autodesk.Revit.DB import *
> 
> doc = DocumentManager.Instance.CurrentDBDocument
> 
> OUT = []
> 
> project_info_collector = FilteredElementCollector(doc) \
> .OfCategory(BuiltInCategory.OST_ProjectInformation) \
> .ToElements()
> 
> for i in project_info_collector:
> project_name_param = i.LookupParameter('Project Name')
> if project_name_param:
> project_name = project_name_param.AsString()
> OUT.Add(project_name)
> 	
> project_number_param = i.LookupParameter('Project Number')
> if project_number_param:
> project_number = project_number_param.AsString()
> OUT.Add(project_number)
> else:
> OUT.Add("Perameter not found")
> 
> ```

Change `.Add` for `.append` and it should work
