okPanic Posted August 26 Share Posted August 26 Recently, I've been using ChatGPT and eventually Github Copilot to write scripts for Google Apps and have had tremendous success. Unbelievable even. I am not a programmer, absolutely hate Javascript but I've been able to automate things with spreadsheets that I've needed for years. Naturally this gave me the idea of creating some custom vectorworks plugins that I've also wanted forever but I have not had similar success. I've directed ChatGPT to the vectorscript documentation and it told me that its based on Pascal. For real? Pascal from the 1960's? I pointed out that it can also use python (which I am a little familiar with) and it then started using python. But even trying to make a very simple plug in, it just gets stuck in a loop of errors. I do not have the time, patience or desire to learn how to do this on my own, so if I can't get AI to do at least 80% of the work for me, it aint gonna happen. So my question is, has anyone had better luck using any of the other LLMs to write vectorscript tools? Quote Link to comment
rDesign Posted August 26 Share Posted August 26 If you do a search of the forums for “ChatGPT” you’ll find a bunch of results for other threads about users who have had varying degrees of success of using ChatGPT to write VS. Quote Link to comment
Pat Stanford Posted August 26 Share Posted August 26 From what I have seen of ChatGPT and Vectorscript, it does not have enough training material to be useful in writing scripts. Almost every case where I have seen someone ask ChatGPT to write a script, it has generate code that looks good, but that uses Functions and Procedures that don't actually exist. You MIGHT have better luck using ChatGPT to write PythonScript instead of VS, but I doubt it. It is the Vectorworks specific functions that it does not understand. But for explaining how a specific function in VS works, or how a script works, ChatGPT seems to work ok for that. 2 Quote Link to comment
JBenghiat Posted August 26 Share Posted August 26 AI is only as good as good as its training input, and Vectorscript just isn't well documented enough or have enough examples for AI to write accurate code. You can use it to help you on specific python tasks (e.g., how do I build and iterate over a list, etc.), but, at best it will probably hallucinate for specific Vectorworks tasks. I would suggest trying to build your scripts with Marionette. You can both edit the code for Marionette nodes and export the whole network as a script -- AI may help you make custom modifications from there. 1 Quote Link to comment
tbexon Posted August 26 Share Posted August 26 So I use GitHub Co Pilot within the PyCharm IDE for writing Python based plugins. It’s definitely helpful and worth having, but as others have said it’s more for autocompletion of this rather than creating an entire plug-in on its own. The documentation available to it, just isn’t enough for it to understand what it’s trying to do. I’ve had multiple instances of copilot making up commands out of thin air that look right, but are in fact completely fictitious. A very handy tool if you already know what the vectorscript should be doing, but it’s certainly as it stands, I don’t see how I will ever be able to write plugins successfully on its own. 1 Quote Link to comment
spettitt Posted August 27 Share Posted August 27 I have only used Python so haven't tried with Vectorscript directly, but for Python, I do find it useful for two tasks. I tend to use it at the start and the end of writing a plugin. When opening up a fresh Python file that I know is going to end up a few hundred lines long, sometimes it's hard to break the 'writer's block' and get started on the first line. I use it to give me a rough outline and structure. I then review anything that needs to change about the structure (i.e. whether there are slicker options for iterations, like ForEachObject), but generally it does a reasonable job. I then swap any Vectorscript functions it has fabricated itself for something workable. Then, I find it useful when there's an annoying issue I just can't trace, i.e. debugging why something just won't exit a loop even though everything is telling me it should. It won't get it every time but it gets it often enough for sure. 1 Quote Link to comment
okPanic Posted September 1 Author Share Posted September 1 Thanks for the replies. I have had a little more success by directing it to this and a couple of other pages in each and every prompt. Without that it starts including functions that are not supported. But I still have not been able to have it write a simple plugin from start to finish. Trying the same approach with marionette is an an interesting idea. The first thing I tried to do was make a plug in that generated a 3D cube and then calculate the force required to tip that cube over using python and give the answer in the OIP and recalculate whenever the variables in the OIP are updated. It got as far as making a cube but no farther. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.