# Get selected floors analytical model

**URL:** <https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457>\
**Category:** Revit\
**Created:** [November 11, 2016, 7:04pm UTC](https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457 "2016-11-11T19:04:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serhan\_Bakir](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Serhan\_Bakir](https://forum.dynamobim.com/u/Serhan_Bakir)\
**Post date:** [November 11, 2016, 7:04pm UTC](https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457/1 "2016-11-11T19:04:19Z")

</div>

Hi there,  
pretty new here on dynamosphere… I’m starting out and trying to create a small script to do the following :

- read a specific parameter value from a structural floor element
- find out the analytical counterpart of that floor
- create a hosted load on that analytical floor depending on the parameter value read before.

I found an example on creating a hosted load but don’t know how to find the analytical version of the selected structural floor element. Any helps is greatly appreciated, thank you…

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [November 11, 2016, 7:57pm UTC](https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457/2 "2016-11-11T19:57:14Z")

</div>

Hello!

- To get parameters use the Element.GetParameterValueByName node
- To get the anlytical model of any element create a python node and use the [GetAnalyticalModel method](http://www.revitapidocs.com/2017/351c2ce0-70c6-62e1-e675-5bd4c259d756.htm)

To get more specific help you have to try first, and then post a screenshot and a dyn file.

---

<div class="post-metadata">

**Author:** ![Serhan\_Bakir](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Serhan\_Bakir](https://forum.dynamobim.com/u/Serhan_Bakir)\
**Post date:** [January 18, 2017, 7:09pm UTC](https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457/3 "2017-01-18T19:09:10Z")

</div>

Hello Einar,

screenshot is what I’ve tried so far, to summarize:

1. I need to get all Analytical Floors
2. Read a parameter value (“DL”) from those elements
3. Create a hosted area load with the value “DL” for each element.

I just can not send the parameter values together with the elements to python script. I’m feeling soo noob 😖

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/0/10260367e287326b0dbd0f8e6569b8008449a371.png)

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [January 19, 2017, 7:53am UTC](https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457/4 "2017-01-19T07:53:05Z")

</div>

At first glance it looks like that example should work, what is the error message you get?

You should move the transaction start outside the loop:  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/c/d/cd560324a3fe901fe9e9cedea7890ad88eace93c.jpg)

---

<div class="post-metadata">

**Author:** ![Serhan\_Bakir](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Serhan\_Bakir](https://forum.dynamobim.com/u/Serhan_Bakir)\
**Post date:** [January 20, 2017, 6:12pm UTC](https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457/5 "2017-01-20T18:12:48Z")

</div>

Hi there,  
I moved transaction outside however I get an error stating:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.  
Traceback (most recent call last):  
File “”, line 27, in   
AttributeError: ‘list’ object has no attribute ‘ToXyz’

[Hosted Area Load.rvt](https://forum.dynamobim.com/uploads/short-url/lwEa8AtOjTEBQwVrkHueI3hrgiz.rvt) (324 KB)  
[HostedAreaLoad.dyn](https://forum.dynamobim.com/uploads/short-url/ngoDITvlm46mA0SG3HcJJOEQUsD.dyn) (6.2 KB)

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [January 20, 2017, 7:01pm UTC](https://forum.dynamobim.com/t/get-selected-floors-analytical-model/7457/6 "2017-01-20T19:01:26Z")

</div>

I added three nodes, and the python script created the load:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/9/59b18f6e6ff538f3cd6f79c4a6a7438ae33321db.png)
