Should packages be installed for run dynamo script?

HI

I made some scripts for my office. But when other users in the office try to use them whit dynamoplayer, they don’t work. Only if they install all the packages I used in the script, the they work.
n
Is this normally? Why?

Kind regards

Yes this is normal. If you used a package in your script the person that is going to use your script must have the same package you used for that script. The problem is that if you don’t have the package installed dynamo won’t recognize the nodes you used from the package.

1 Like

yes it is normal. Dynamo should be able to read the reference packages in order to utilise it. You can set the default path of the custom package to a shared drive and change all user’s reference of the node and packages to the shared drive so that double installation will not be required.

1 Like

Thanks for the Information. I removed all packages and installed them again in a shared drive. But when I try to change the path of an user to this shared path dynamo crashes. Do i make something wrong?

An other way is to explode the custom nodes, so they won’t have any connections anymore.

Well, maybe you can show me an example of how it crash and your settings? cant help much without any information. And i would recommend exploding them as we, as user of custom node, must give credits to whomever developed it. They already made it open source, free for us to use.


image
something like this?

Yes exactly! I changed the path and installed again all packages. Then I tried to change the path from a user terminal and it was not possible, Dynamo and Revit closed directly!

I think I will explode them, so no problem anymore :slight_smile:

try restarting the machine? mine had no issue. is there any other duplicated libraries?

you can explode for those developer using ironpython, but when it comes to zerotouch node, then you will have the issue of not being able to extract the codes out…

1 Like

Yes that is what happening now. I have a Node from Orchid “List.SortNatural” which i can’t explode.

You can built same function using Python:

import re

#input assigned the IN variable
data = IN[0] #list
boolean = IN[1] #Boolean to reverse

def natural_sort(var):
    convert = lambda text: int(text) if text.isdigit() else text.lower()
    alphanum = lambda key: [convert(t) for t in re.split('([0-9]+)', key)]
    return sorted(var, key = alphanum, reverse = boolean)

OUT = natural_sort(data)
3 Likes

HI
Thank you a lot, it works perfect.

Kind regards

You’re Welcome :wink:

Correct me if I’m wrong, coz i also plan to do like this before.

The problem with exploding the node is that you cannot use lacing option anymore right?

What do you mean?

That’s one issue in that list lacing and levels become more difficult to leverage. The other is that once broken down you have to edit every graph that has that node combination in it if there is ever a breaking API change.

1 Like

Hello to everybody:

Does anybody know how to integrate the script you earlier wrote with the script to sort List of Lists by first/second/…/ index? (In attachment)

It is my first encounter with coding so I’m a bit bewildered.

Thank you in any case and have a nice day!