# DesignScript

**URL:** https://forum.dynamobim.com/c/designscript/7.md

[Latest](https://forum.dynamobim.com/latest.md) · [Categories](https://forum.dynamobim.com/categories.md) · [Tags](https://forum.dynamobim.com/tags.md)

---

## [About the DesignScript category](https://forum.dynamobim.com/t/about-the-designscript-category/4036)

<div class="topic-metadata">

**Author:** [@system](https://forum.dynamobim.com/u/system)\
**Replies:** 0\
**Last updated:** [May 18, 2016, 1:16pm UTC](https://forum.dynamobim.com/t/about-the-designscript-category/4036 "2016-05-18T13:16:19Z")

</div>

Topics related to DesignScript, the programming language at the heart of Dynamo. What kind of syntax can I use to get the effect I want? When to use DesignScript or another method (C#, Zero Touch, Python, etc) Code …

---

## [When Tag element in multi view =\> Time run Script very slow](https://forum.dynamobim.com/t/when-tag-element-in-multi-view-time-run-script-very-slow/78420)

<div class="topic-metadata">

**Author:** [@manhgt214](https://forum.dynamobim.com/u/manhgt214)\
**Replies:** 4\
**Last updated:** [July 5, 2026, 7:37am UTC](https://forum.dynamobim.com/t/when-tag-element-in-multi-view-time-run-script-very-slow/78420 "2026-07-05T07:37:10Z")

</div>

Hi Everybody!!! I use node Tag.ByElement to place tag for Structural Framing in view. when I choose 1 view =\> run script very fast but when I choose 2 view =\> time run script very slow (I did change Lacing of Node) A…

---

## [Syntax problem of For / While loops or Imperative block](https://forum.dynamobim.com/t/syntax-problem-of-for-while-loops-or-imperative-block/114427)

<div class="topic-metadata">

**Author:** [@ISECnico](https://forum.dynamobim.com/u/ISECnico)\
**Replies:** 5\
**Last updated:** [April 20, 2026, 7:28am UTC](https://forum.dynamobim.com/t/syntax-problem-of-for-while-loops-or-imperative-block/114427 "2026-04-20T07:28:50Z")

</div>

Hi All, My objective is to produce a correctly ordered and directed sequence of lines. The input lines have draw / selection order that is random and line directions are also inconsistent. I also input the start point …

---

## [Importing Data From Excel and Put it into Type Parameters of Structural Foundation](https://forum.dynamobim.com/t/importing-data-from-excel-and-put-it-into-type-parameters-of-structural-foundation/114436)

<div class="topic-metadata">

**Author:** [@hmzamz94](https://forum.dynamobim.com/u/hmzamz94)\
**Replies:** 1\
**Last updated:** [April 20, 2026, 1:22am UTC](https://forum.dynamobim.com/t/importing-data-from-excel-and-put-it-into-type-parameters-of-structural-foundation/114436 "2026-04-20T01:22:51Z")

</div>

What I’m trying to do: I have a footing schedule in Excel : Mark, Footing Size, Bottom Steel (X), Bottom Steel (Y), Top Steel (X), Top Steel (Y). I want to read this schedule and write the steel parameter values into th…

---

## [Placing Electrical Families at Linked Locations - Hosting and Rotation issues (Revit 2025)](https://forum.dynamobim.com/t/placing-electrical-families-at-linked-locations-hosting-and-rotation-issues-revit-2025/113586)

<div class="topic-metadata">

**Author:** [@or\_mUNA98](https://forum.dynamobim.com/u/or_mUNA98)\
**Replies:** 1\
**Last updated:** [January 6, 2026, 8:28am UTC](https://forum.dynamobim.com/t/placing-electrical-families-at-linked-locations-hosting-and-rotation-issues-revit-2025/113586 "2026-01-06T08:28:22Z")

</div>

Hi everyone, I’m trying to automate the placement of my Electrical/Lighting Families based on a linked consultant’s model in Revit 2025. My Workflow: I’ve tried using Dynamo (with BimorphNodes and Rhythm) and DiRootsO…

---

## [Optimizing Design Script code to make it work faster](https://forum.dynamobim.com/t/optimizing-design-script-code-to-make-it-work-faster/113364)

<div class="topic-metadata">

**Author:** [@sensiblehira](https://forum.dynamobim.com/u/sensiblehira)\
**Replies:** 9\
**Last updated:** [December 8, 2025, 10:05pm UTC](https://forum.dynamobim.com/t/optimizing-design-script-code-to-make-it-work-faster/113364 "2025-12-08T22:05:57Z")

</div>

origins; directions; view; a = null; finalPoints = \[\]; \[Imperative\] { for (i in 0..Count(origins)-1) { roomsPoints = origins\[i\]; roomsPointsDirections = directions\[i\]; for (j in 0..Count(roomsPoints)-1) { o …

---

## [Inconsistent behavior with replication guides](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639)

<div class="topic-metadata">

**Author:** [@salmakh.1627](https://forum.dynamobim.com/u/salmakh.1627)\
**Replies:** 9\
**Last updated:** [October 16, 2025, 7:58pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639 "2025-10-16T19:58:22Z")

</div>

I’m still a beginner with designscript, so excuse me if this is a stupid question… I’ve been noticing that replication guides often give me inconsistent results. Here is an example of what I mean: Here I’m trying to …

---

## [Replication guides in an imperative block](https://forum.dynamobim.com/t/replication-guides-in-an-imperative-block/112548)

<div class="topic-metadata">

**Author:** [@salmakh.1627](https://forum.dynamobim.com/u/salmakh.1627)\
**Replies:** 8\
**Last updated:** [October 1, 2025, 11:15am UTC](https://forum.dynamobim.com/t/replication-guides-in-an-imperative-block/112548 "2025-10-01T11:15:40Z")

</div>

Hello, all! I am a DesignScript beginner, and I need help rewriting this code without using the replication guides since they do not work in imperative blocks. I wanted to retry this using python but I have little to…

---

## [Error in Springs.FamilyInstance.ByGeometry in Revit 2024](https://forum.dynamobim.com/t/error-in-springs-familyinstance-bygeometry-in-revit-2024/112336)

<div class="topic-metadata">

**Author:** [@CaraLily](https://forum.dynamobim.com/u/CaraLily)\
**Replies:** 7\
**Last updated:** [September 15, 2025, 9:14am UTC](https://forum.dynamobim.com/t/error-in-springs-familyinstance-bygeometry-in-revit-2024/112336 "2025-09-15T09:14:48Z")

</div>

Hello,I am a beginner user of Dynamo , and trying to generate Revit families from the solid created by Dynamo. I used Springs.FamilyInstance.ByGeometry note in Dynamo. I received the results as null. Could you please se…

---

## [Dynamo structural simple scripts to improve my skills](https://forum.dynamobim.com/t/dynamo-structural-simple-scripts-to-improve-my-skills/112047)

<div class="topic-metadata">

**Author:** [@hassanalbaghdadi14](https://forum.dynamobim.com/u/hassanalbaghdadi14)\
**Replies:** 1\
**Last updated:** [August 22, 2025, 7:54am UTC](https://forum.dynamobim.com/t/dynamo-structural-simple-scripts-to-improve-my-skills/112047 "2025-08-22T07:54:10Z")

</div>

Hello Guys Im BIM Modeller structural engineer im looking for dynamo structural scripts anyone can send me simple structural scripts in dynamo please

---

## [Data Input Type Conflict](https://forum.dynamobim.com/t/data-input-type-conflict/111450)

<div class="topic-metadata">

**Author:** [@matt.wna](https://forum.dynamobim.com/u/matt.wna)\
**Replies:** 3\
**Last updated:** [July 24, 2025, 7:31pm UTC](https://forum.dynamobim.com/t/data-input-type-conflict/111450 "2025-07-24T19:31:10Z")

</div>

Hoping someone can point me in the right direction here with this one as I’m fairly sure its a basic issue, but I continually get stuck on it anytime python comes up. I need to understand what the difference is between …

---

## [List.combine node outputting null lists](https://forum.dynamobim.com/t/list-combine-node-outputting-null-lists/110914)

<div class="topic-metadata">

**Author:** [@OABDELLATIF05](https://forum.dynamobim.com/u/OABDELLATIF05)\
**Replies:** 2\
**Last updated:** [June 24, 2025, 11:58pm UTC](https://forum.dynamobim.com/t/list-combine-node-outputting-null-lists/110914 "2025-06-24T23:58:03Z")

</div>

Hey, I’m new to Dynamo and I am curious as to why my list.combine is outputting null instead of values. My original goal is to use List.Cartesianproduct by I found that this is also an issue with List.Combine and I am a…

---

## [Hide Elements in View - Apply Filter between two lists](https://forum.dynamobim.com/t/hide-elements-in-view-apply-filter-between-two-lists/110464)

<div class="topic-metadata">

**Author:** [@FP29](https://forum.dynamobim.com/u/FP29)\
**Replies:** 8\
**Last updated:** [June 3, 2025, 8:44pm UTC](https://forum.dynamobim.com/t/hide-elements-in-view-apply-filter-between-two-lists/110464 "2025-06-03T20:44:08Z")

</div>

Hello everyone! I need a little help with Dynamo. I’m trying to automate the formatting of sales plans for a residential building. I have several sheets (one per apartment), each containing a location plan for the cor…

---

## [Function Error: Works as Code Block but not as Fuction](https://forum.dynamobim.com/t/function-error-works-as-code-block-but-not-as-fuction/109294)

<div class="topic-metadata">

**Author:** [@AntonioRojas](https://forum.dynamobim.com/u/AntonioRojas)\
**Replies:** 1\
**Last updated:** [April 4, 2025, 9:26pm UTC](https://forum.dynamobim.com/t/function-error-works-as-code-block-but-not-as-fuction/109294 "2025-04-04T21:26:11Z")

</div>

I have a snippet that I use 4 times in my script, I decided to create a function but when function is used I got an error: Warning: desplazarPunto expects argument type(s) (var, double, double, double), but was called…

---

## [Vector Subtraction from Point](https://forum.dynamobim.com/t/vector-subtraction-from-point/108785)

<div class="topic-metadata">

**Author:** [@akshay.korlekar](https://forum.dynamobim.com/u/akshay.korlekar)\
**Replies:** 2\
**Last updated:** [March 17, 2025, 4:33pm UTC](https://forum.dynamobim.com/t/vector-subtraction-from-point/108785 "2025-03-17T16:33:52Z")

</div>

I have here a very curious problem. This is more about geometry aspects related to vectors. So this is an exercise from the Dynamo Language Manual. The aim here is to create two continuous NURBSCurves in such a way that…

---

## [Code block math operators?](https://forum.dynamobim.com/t/code-block-math-operators/108689)

<div class="topic-metadata">

**Author:** [@terjefj](https://forum.dynamobim.com/u/terjefj)\
**Replies:** 2\
**Last updated:** [March 13, 2025, 2:17am UTC](https://forum.dynamobim.com/t/code-block-math-operators/108689 "2025-03-13T02:17:36Z")

</div>

is there a easy way to take the power or Math.Pow(num,pow) the only way? 2^3 would make it more readable dxy=Math.Sqrt(Math.Pow(a.StartPoint.X-a.EndPoint.X,2)+Math.Pow(a.StartPoint.Y-a.EndPoint.Y,2));

---

## [Schedule filter by level not working](https://forum.dynamobim.com/t/schedule-filter-by-level-not-working/85023)

<div class="topic-metadata">

**Author:** [@pari2105](https://forum.dynamobim.com/u/pari2105)\
**Replies:** 17\
**Last updated:** [March 12, 2025, 10:31am UTC](https://forum.dynamobim.com/t/schedule-filter-by-level-not-working/85023 "2025-03-12T10:31:13Z")

</div>

Hello all, I am new to dynamo and trying to create schedule by level and assign level filter to it. but I am getting an error msg as “Warning: ScheduleView.AddFilters operation failed. The filter value is not valid fo…

---

## [Dynamo DesignScript Learning Resources](https://forum.dynamobim.com/t/dynamo-designscript-learning-resources/6359)

<div class="topic-metadata">

**Author:** [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Replies:** 2\
**Last updated:** [March 9, 2025, 6:03pm UTC](https://forum.dynamobim.com/t/dynamo-designscript-learning-resources/6359 "2025-03-09T18:03:53Z")

</div>

Since the question keeps appearing on the forum I thought I would create a dedicated topic so its easily searchable. DesignScript is Dynamo's native scripting language and is similar to C# and Python. I would recommend…

---

## [Code Block Function Help](https://forum.dynamobim.com/t/code-block-function-help/90333)

<div class="topic-metadata">

**Author:** [@patrick\_podeyn](https://forum.dynamobim.com/u/patrick_podeyn)\
**Replies:** 5\
**Last updated:** [March 3, 2025, 4:51am UTC](https://forum.dynamobim.com/t/code-block-function-help/90333 "2025-03-03T04:51:48Z")

</div>

I’m trying to figure out how to or if it’s possible to use design script node calls in functions. I have here a relatively small example of trying to flatten a list of lists and I am not able to get it to work in the fun…

---

## [Cuboid Function](https://forum.dynamobim.com/t/cuboid-function/108268)

<div class="topic-metadata">

**Author:** [@akshay.korlekar](https://forum.dynamobim.com/u/akshay.korlekar)\
**Replies:** 11\
**Last updated:** [March 2, 2025, 6:14pm UTC](https://forum.dynamobim.com/t/cuboid-function/108268 "2025-03-02T18:14:00Z")

</div>

I am a newbie to Dynamo and was studying Design Script. While doing so I came upon a script example that asked for the extraction of surface geometry of a cuboid. The argument went: Cuboid.Faces.SurfaceGeometry() Cuboi…

---

## [Advice on a Script](https://forum.dynamobim.com/t/advice-on-a-script/107423)

<div class="topic-metadata">

**Author:** [@n.raducan](https://forum.dynamobim.com/u/n.raducan)\
**Replies:** 28\
**Last updated:** [February 11, 2025, 7:14am UTC](https://forum.dynamobim.com/t/advice-on-a-script/107423 "2025-02-11T07:14:49Z")

</div>

Hi, So I have some coordinates that I have placed in Excel (x, y, and z ), these coordinates will put into place a family that has been created in Revit into a project. There are loads of these parts that need to be pla…

---

## [Values placed, Preview displaying null](https://forum.dynamobim.com/t/values-placed-preview-displaying-null/107301)

<div class="topic-metadata">

**Author:** [@n.raducan](https://forum.dynamobim.com/u/n.raducan)\
**Replies:** 11\
**Last updated:** [January 21, 2025, 11:53am UTC](https://forum.dynamobim.com/t/values-placed-preview-displaying-null/107301 "2025-01-21T11:53:35Z")

</div>

I am a beginner at Dynamo and I have tried following three tutorials but each time I put a value/ select elements, they all come up as null and therefore I am not able to run the script. Is there a settings I need to cha…

---

## [Node error report - Show warning message](https://forum.dynamobim.com/t/node-error-report-show-warning-message/64288)

<div class="topic-metadata">

**Author:** [@Lucy\_Lastparametrics](https://forum.dynamobim.com/u/Lucy_Lastparametrics)\
**Replies:** 4\
**Last updated:** [January 21, 2025, 11:22am UTC](https://forum.dynamobim.com/t/node-error-report-show-warning-message/64288 "2025-01-21T11:22:07Z")

</div>

Hi all, I was wondering if there is a way how to extract the warning message for example to a string node if there is some node with an error in the script. My point is, that when I run the script via Dynamo Player, and…

---

## [Design option sets and options creation from excel data](https://forum.dynamobim.com/t/design-option-sets-and-options-creation-from-excel-data/40006)

<div class="topic-metadata">

**Author:** [@IITSURAJ](https://forum.dynamobim.com/u/IITSURAJ)\
**Replies:** 1\
**Last updated:** [January 20, 2025, 9:15am UTC](https://forum.dynamobim.com/t/design-option-sets-and-options-creation-from-excel-data/40006 "2025-01-20T09:15:22Z")

</div>

Hi, I am looking for a way to automate the creation of design option sets and related options within all sets. I didn’t find any “create method” for design options. In my project, revit file has 15+ design option sets a…

---

## [I want to a Add one more input Boolean(True/False) to the below python script, please helpout on these](https://forum.dynamobim.com/t/i-want-to-a-add-one-more-input-boolean-true-false-to-the-below-python-script-please-helpout-on-these/106798)

<div class="topic-metadata">

**Author:** [@ramsaik495](https://forum.dynamobim.com/u/ramsaik495)\
**Replies:** 8\
**Last updated:** [December 24, 2024, 8:34am UTC](https://forum.dynamobim.com/t/i-want-to-a-add-one-more-input-boolean-true-false-to-the-below-python-script-please-helpout-on-these/106798 "2024-12-24T08:34:25Z")

</div>

import clr clr.AddReference(‘System’) from System.Collections.Generic import List clr.AddReference(“RevitServices”) import RevitServices from RevitServices.Persistence import DocumentManager Current doc/app/ui doc …

---

## [All Section views hide Except Selected Sheet Section Views](https://forum.dynamobim.com/t/all-section-views-hide-except-selected-sheet-section-views/106488)

<div class="topic-metadata">

**Author:** [@vijaya.kumarKS55G](https://forum.dynamobim.com/u/vijaya.kumarKS55G)\
**Replies:** 5\
**Last updated:** [December 11, 2024, 11:48am UTC](https://forum.dynamobim.com/t/all-section-views-hide-except-selected-sheet-section-views/106488 "2024-12-11T11:48:26Z")

</div>

“Hi everyone, I tried to hide the section views that are not presented on the selected sheet, but I couldn’t achieve the desired result. Can anyone assist me in getting the correct output?”

---

## [Using Node Command in imperative Code Block](https://forum.dynamobim.com/t/using-node-command-in-imperative-code-block/106413)

<div class="topic-metadata">

**Author:** [@paul.rubenbauerHWRZ2](https://forum.dynamobim.com/u/paul.rubenbauerHWRZ2)\
**Replies:** 1\
**Last updated:** [December 8, 2024, 1:08pm UTC](https://forum.dynamobim.com/t/using-node-command-in-imperative-code-block/106413 "2024-12-08T13:08:49Z")

</div>

Hi, i’m trying to iterate through a list of elements and creating filters based on the elements. In the upper half screenshot example you can see what i expect the output to look like, I could now copy this line for al…

---

## [String formating(Numbers)](https://forum.dynamobim.com/t/string-formating-numbers/105766)

<div class="topic-metadata">

**Author:** [@mpocinek](https://forum.dynamobim.com/u/mpocinek)\
**Replies:** 6\
**Last updated:** [November 13, 2024, 2:47pm UTC](https://forum.dynamobim.com/t/string-formating-numbers/105766 "2024-11-13T14:47:38Z")

</div>

Hi, I have switched from Revit 2022 to 2024, and encountered something that seemed strange to me, but perhaps there is just a setting I haven’t found yet. Basically this keeps happening to me: I assumed that a stri…

---

## [Room name doesn't appear in Panel schedule](https://forum.dynamobim.com/t/room-name-doesnt-appear-in-panel-schedule/105368)

<div class="topic-metadata">

**Author:** [@Abdallah-Abdellateef](https://forum.dynamobim.com/u/Abdallah-Abdellateef)\
**Replies:** 0\
**Last updated:** [October 24, 2024, 1:20pm UTC](https://forum.dynamobim.com/t/room-name-doesnt-appear-in-panel-schedule/105368 "2024-10-24T13:20:44Z")

</div>

in some way i need to define circuit location in panel schedule so i need to transfer room name from electrical fixture to electrical circuit to be readable in panel schedule.

---

## [Recovering nodes](https://forum.dynamobim.com/t/recovering-nodes/104391)

<div class="topic-metadata">

**Author:** [@marcella.rib.moura](https://forum.dynamobim.com/u/marcella.rib.moura)\
**Replies:** 3\
**Last updated:** [September 16, 2024, 11:25am UTC](https://forum.dynamobim.com/t/recovering-nodes/104391 "2024-09-16T11:25:29Z")

</div>

Hi, I did this script a few years ago and loaded a few scripts from the Dynamo library to make it work. Now when I open the code on a new laptop I cannot remember what blocks I had used from the library to download them…

[Next page](https://forum.dynamobim.com/c/designscript/7.md?page=1)
