# Element.set.Parameter by Value Not working

**URL:** <https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [March 20, 2023, 9:17am UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534 "2023-03-20T09:17:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![NOURALDEEN](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@NOURALDEEN](https://forum.dynamobim.com/u/NOURALDEEN)\
**Post date:** [March 20, 2023, 9:17am UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/1 "2023-03-20T09:17:19Z")

</div>

Hi All,  
I’m trying to create a script that create sheets from an Excel file, all gose well, and the script creates all the sheets, but, I want to categorize the created sheets by a parameter I had created for sheets called “Sheets Type”, the problem is the Node “Element.set.Parameter by Value” return an error, it had worked previously… but now it dosn’t … any suggestions ?

regards  
[Sheets From Excel Tests.dyn](https://forum.dynamobim.com/uploads/short-url/b05aMY3HwjV33FOxmBUA5F0YwOR.dyn) (33.9 KB)

 ![Sheets From Excel Tests_2023-03-20_12-17-02](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/9/a90f6de257356f603cc3f0fc883f35184b59308a.png)

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [March 20, 2023, 9:59am UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/2 "2023-03-20T09:59:05Z")

</div>

Hi, We cant really see what’s going on as the error is not visible and neither are the node content previews.

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [March 20, 2023, 10:16am UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/3 "2023-03-20T10:16:26Z")

</div>

Look like a Data type error… Share the error for better clarification.

---

<div class="post-metadata">

**Author:** ![NOURALDEEN](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@NOURALDEEN](https://forum.dynamobim.com/u/NOURALDEEN)\
**Post date:** [March 20, 2023, 12:11pm UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/4 "2023-03-20T12:11:48Z")

</div>

Thanks for your reply, the warning says: Internal error, please report: Dereferencing a non-pointer.

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [March 20, 2023, 12:27pm UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/5 "2023-03-20T12:27:14Z")

</div>

Why are you joining the sheets, which are elements, together with the Excel data? Also, perhaps you need a transaction.end node after the sheet creation.

PS: as both other replies stated, please share what data is going through your nodes.

---

<div class="post-metadata">

**Author:** ![NOURALDEEN](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@NOURALDEEN](https://forum.dynamobim.com/u/NOURALDEEN)\
**Post date:** [March 20, 2023, 12:45pm UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/6 "2023-03-20T12:45:59Z")

</div>

[Sheets.xlsx](https://forum.dynamobim.com/uploads/short-url/9a8ige4oSF4Q6vGVE925Cq493UV.xlsx) (13.0 KB)

thanks for the reply, sure, please find my Excel sheet…

---

<div class="post-metadata">

**Author:** ![manhgt214](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/manhgt214/32/153251_2.png) [@manhgt214](https://forum.dynamobim.com/u/manhgt214)\
**Post date:** [March 20, 2023, 1:15pm UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/7 "2023-03-20T13:15:21Z")

</div>

Please check ① and ②

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/c/4c186a5b33d7421c2d2503c383fedbfbb6a6e7e8.png)

---

<div class="post-metadata">

**Author:** ![NOURALDEEN](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@NOURALDEEN](https://forum.dynamobim.com/u/NOURALDEEN)\
**Post date:** [March 20, 2023, 1:51pm UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/8 "2023-03-20T13:51:03Z")

</div>

for point 2 : yes, I had created a project parameter for the sheets.  
for point 1 : I just were trying out, and I don’t know how fill the parameter with data from excel sheet, knowing that it had worked earlier…

---

<div class="post-metadata">

**Author:** ![jonnyhaslett](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonnyhaslett/32/154509_2.png) [@jonnyhaslett](https://forum.dynamobim.com/u/jonnyhaslett)\
**Post date:** [March 20, 2023, 2:00pm UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/9 "2023-03-20T14:00:25Z")

</div>

is the parameter type or instance based?  
If its type based i think you need to use a different node.

also worth checking is the parameter is on the titleblock family or the sheet? These are 2 different elements. If the parameter only exists on the title block you are feeding the wrong element into the set by name node.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [March 20, 2023, 4:58pm UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/10 "2023-03-20T16:58:22Z")

</div>

Issue might be that you are trying to set a Parameter of an Element (in this case the Sheet),  
which doesn’t exist (yet).

So maybe a _PassThrough_ node after the create  
_Sheets Create_ node and before the _Element.SetParamterByName_ node?

Basicly what @Daan says.

> Also, perhaps you need a transaction.end node after the sheet creation.

---

<div class="post-metadata">

**Author:** ![manhgt214](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/manhgt214/32/153251_2.png) [@manhgt214](https://forum.dynamobim.com/u/manhgt214)\
**Post date:** [March 21, 2023, 1:52am UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/11 "2023-03-21T01:52:43Z")

</div>

Try this:

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a773b5b3bb6d3862e2a20ea00ac71d893a35b873.png)

---

<div class="post-metadata">

**Author:** ![NOURALDEEN](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@NOURALDEEN](https://forum.dynamobim.com/u/NOURALDEEN)\
**Post date:** [March 21, 2023, 8:49am UTC](https://forum.dynamobim.com/t/element-set-parameter-by-value-not-working/87534/12 "2023-03-21T08:49:55Z")

</div>

Thank you @manhgt214, it does worked, although I had tried this before, but it worked for now…

And thanks for all those who tried to help me out
