Add function in python library

Hi,
In this topic on the italian forum…

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”

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

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

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

1 Like

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)

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

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.

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

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/5/api/RhinoCommonWin/html/N_Rhino.htm (V5)
https://developer.rhino3d.com/api/RhinoCommon/html/R_Project_RhinoCommon.htm (V6)

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

Just to keep everything in order.

Thanks Alain !

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

Regards

1 Like

Hi,

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