Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script-sync to gh python component #49

Open
nizartaha opened this issue Nov 29, 2024 · 1 comment
Open

script-sync to gh python component #49

nizartaha opened this issue Nov 29, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@nizartaha
Copy link

nizartaha commented Nov 29, 2024

Hi @9and3

Thanks again for the component. it makes it easier to write in vscode and sync to gh.
I'm interested in creating a Grasshopper component from the script-sync component. My goal is to share this functionality with others, potentially as a Python component. Could you please advise me on the best approach for achieving this?

For context, the main Python file which is linked to my script-sync components imports functions from another Python file within the same module.

Thank you

@9and3 9and3 added the help wanted Extra attention is needed label Dec 2, 2024
@9and3
Copy link
Collaborator

9and3 commented Dec 2, 2024

Hello @nizartaha

Thanks again for the component. it makes it easier to write in vscode and sync to gh.

Glad to hear that, that was the goal 👐 !

I'm interested in creating a Grasshopper component from the script-sync component. My goal is to share this functionality with others, potentially as a Python component. Could you please advise me on the best approach for achieving this?

For context, the main Python file which is linked to my script-sync components imports functions from another Python file within the same module.

If you didn't have modules that would be super easy: copy-paste your code in a new vanilla python grasshopper component and that's it. Now if you have modules that's more complex. You have two solutions:

--> 1) you share the script-sync component with the same files in the same structure you are using and the other user would have to re-point to the running script once downloaded
-- 2) I haven't tried it but the new text programming component from RV8, accepts "Libraries" aka modules. So:
Open grasshopper and type script >> drop the native component on the canvas >> then press Shift + Right Click on the component logo (this will get you to some "hidden" parameters) >> click on Library Input Parameters (see image) >> now press the Python button >> insert the path to your modules.

image

Not sure if the 2nd method works and in any case the user would have to do all this stuff. Maybe it's easier to share the folder of your project with the running script and modules and a script-sync component after all..

Hope this can help..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants