# Add function in python library

**URL:** <https://discourse.mcneel.com/t/add-function-in-python-library/66426>\
**Category:** Scripting\
**Tags:** python\
**Created:** [July 6, 2018, 6:33am UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426 "2018-07-06T06:33:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![enzo\_molinari](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/enzo_molinari/32/524891_2.png) [@enzo\_molinari](https://discourse.mcneel.com/u/enzo_molinari)\
**Post date:** [July 6, 2018, 6:33am UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/1 "2018-07-06T06:33:34Z")

</div>

Hi,  
In this topic on the italian forum…

[https://it.discourse.mcneel.com/t/quota-angolare-con-python/1844](https://it.discourse.mcneel.com/t/quota-angolare-con-python/1844)

the poblem was a missing function to add an angular dimension using python.

Thanks to @emilio, we came up with a nice script.

Now, I would like to know if it’s possible to install it in the right place, colse to the others “Add…Dimension”

 ![deflib](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/8/780a904bc559bf524430a40cbd43fbf935e0f116.jpg)

---

<div class="post-metadata">

**Author:** ![enzo\_molinari](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/enzo_molinari/32/524891_2.png) [@enzo\_molinari](https://discourse.mcneel.com/u/enzo_molinari)\
**Post date:** [July 9, 2018, 2:32pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/2 "2018-07-09T14:32:12Z")

</div>

Maybe it’s not a good idea to mess around with libraries.

---

<div class="post-metadata">

**Author:** ![ivelin.peychev](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ivelin.peychev/32/676038_2.png) [@ivelin.peychev](https://discourse.mcneel.com/u/ivelin.peychev)\
**Post date:** [July 10, 2018, 10:06am UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/3 "2018-07-10T10:06:53Z")

</div>

If you know what you’re doing, do so in there  
C:\Users%currentuser%\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (some-uuid-number)\settings\lib

---

<div class="post-metadata">

**Author:** ![Alain](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alain/32/512812_2.png) [@Alain](https://discourse.mcneel.com/u/Alain)\
**Post date:** [July 10, 2018, 10:30am UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/4 "2018-07-10T10:30:43Z")

</div>

Hi,  
If @emilio creates a pull request at [https://github.com/mcneel/rhinoscriptsyntax](https://github.com/mcneel/rhinoscriptsyntax), we’re happy to add the function to the library.

---

<div class="post-metadata">

**Author:** ![enzo\_molinari](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/enzo_molinari/32/524891_2.png) [@enzo\_molinari](https://discourse.mcneel.com/u/enzo_molinari)\
**Post date:** [July 10, 2018, 1:07pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/5 "2018-07-10T13:07:52Z")

</div>

Thanks @Alain

In this case we have something that can be useful for many people, but what if I need to add a “custom” library, where should I put it?

C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib  
or  
C:\Users\Pc\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib

(I would like to see my “custom” library on the list in the Rhino Python Editor)

---

<div class="post-metadata">

**Author:** ![AndersDeleuran](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/andersdeleuran/32/476683_2.png) [@AndersDeleuran](https://discourse.mcneel.com/u/AndersDeleuran)\
**Post date:** [July 10, 2018, 1:18pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/6 "2018-07-10T13:18:21Z")

</div>

You can put it anywhere you like (if you add a path to it here):

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/6/7/6795d85b0b2c5d600cc049bb3a24b5b3043d297c.png)

That said I prefer issuing Python modules to this folder:

`C:\Users\USERNAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts`

As it’s pretty accessible to most users and is hardcoded out of the box.

---

<div class="post-metadata">

**Author:** ![enzo\_molinari](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/enzo_molinari/32/524891_2.png) [@enzo\_molinari](https://discourse.mcneel.com/u/enzo_molinari)\
**Post date:** [July 10, 2018, 1:22pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/7 "2018-07-10T13:22:11Z")

</div>

thanks @AndersDeleuran,  
can you see your Lib in the Editor?

---

<div class="post-metadata">

**Author:** ![AndersDeleuran](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/andersdeleuran/32/476683_2.png) [@AndersDeleuran](https://discourse.mcneel.com/u/AndersDeleuran)\
**Post date:** [July 10, 2018, 1:34pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/8 "2018-07-10T13:34:09Z")

</div>

Ah yes, probably not. I much prefer the online documentation, so tend to rely on those instead:

[https://developer.rhino3d.com/api/RhinoScriptSyntax/](https://developer.rhino3d.com/api/RhinoScriptSyntax/)  
[https://developer.rhino3d.com/5/api/RhinoCommonWin/html/N\_Rhino.htm](https://developer.rhino3d.com/5/api/RhinoCommonWin/html/N_Rhino.htm) (V5)  
[https://developer.rhino3d.com/api/RhinoCommon/html/R\_Project\_RhinoCommon.htm](https://developer.rhino3d.com/api/RhinoCommon/html/R_Project_RhinoCommon.htm) (V6)

---

<div class="post-metadata">

**Author:** ![enzo\_molinari](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/enzo_molinari/32/524891_2.png) [@enzo\_molinari](https://discourse.mcneel.com/u/enzo_molinari)\
**Post date:** [July 10, 2018, 1:47pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/9 "2018-07-10T13:47:02Z")

</div>

I would like to learn how to create my custom library (help included).

 ![Custom](https://global.discourse-cdn.com/mcneel/original/3X/8/d/8d3b6e55585a870c9c8be9155425b06bb9c5be3d.jpg)

Just to keep everything in order.

 ![script](https://global.discourse-cdn.com/mcneel/original/3X/9/6/96319d7ac16cde45dd275f9a42ab908f5ecb4ff3.jpg)

---

<div class="post-metadata">

**Author:** ![emilio](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/emilio/32/771014_2.png) [@emilio](https://discourse.mcneel.com/u/emilio)\
**Post date:** [July 10, 2018, 2:34pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/10 "2018-07-10T14:34:38Z")

</div>

> [@Alain](#):
>
> pull request

Thanks Alain !

I’ll have to test the script and polish it quite a bit first …

Regards

---

<div class="post-metadata">

**Author:** ![Alain](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alain/32/512812_2.png) [@Alain](https://discourse.mcneel.com/u/Alain)\
**Post date:** [July 11, 2018, 1:39pm UTC](https://discourse.mcneel.com/t/add-function-in-python-library/66426/11 "2018-07-11T13:39:34Z")

</div>

Hi,

Unfortunately I don’t think there’s a practical way to do that right now.
