# DesignScript Define Function

**URL:** <https://forum.dynamobim.com/t/designscript-define-function/46244>\
**Category:** DesignScript\
**Tags:** designscript\
**Created:** [February 1, 2020, 11:53pm UTC](https://forum.dynamobim.com/t/designscript-define-function/46244 "2020-02-01T23:53:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaaamie](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jaaamie](https://forum.dynamobim.com/u/jaaamie)\
**Post date:** [February 1, 2020, 11:53pm UTC](https://forum.dynamobim.com/t/designscript-define-function/46244/1 "2020-02-01T23:53:20Z")

</div>

Hi all,  
Please excuse me if this seems to be a really dumb question…  
Can someone shed some light on me of how to convert the code below in the screenshot into a function using designscript?  
I did read the designscript guide but pardon me that I just couldn’t wrap my head around this one. Thanks heaps!

 ![DesignScript2_2020-02-02_10-51-03](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/a/eadb53f66802dba1e311306fa85be95ed95993ae.png)  
Cheers,  
Jamie

---

<div class="post-metadata">

**Author:** ![jaaamie](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jaaamie](https://forum.dynamobim.com/u/jaaamie)\
**Post date:** [February 2, 2020, 1:16am UTC](https://forum.dynamobim.com/t/designscript-define-function/46244/2 "2020-02-02T01:16:27Z")

</div>

So I just figured it out… I’ll have to specify the argument type. For anyone who might have the same question, check the screenshot below.

 ![Effective Apperature_2020-02-02_12-13-43](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/7/f76f6b55404b0c206f286268e90575ba81d88900.png)
