XML scripting trouble

I’m trying to run this script via WorldMachine’s GUI:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<automation version="WMP2">

    <!-- Define the Advanced Perlin device node -->
    <Node Type="Advanced Perlin" X="100" Y="100" />
    <!-- Define the second node -->
    <Node Type="Erosion" X="300" Y="100" />
    <!-- Connect the nodes -->
    <Connection Source="1" SourceOutput="0" Dest="2" DestInput="0" />


Unfortunately nothing appears to happen.

It is expected that an Advanced Perlin device and an Erosion device will be placed close to the Device View’s grid origin X.

Does anyone know why?

I’m not finding any documentation anywhere that involves creating new devices, so it could be an error in the syntax of those lines, or creating devices might not be supported in the current automation version. Failing that, I’d ask for a link to whatever source led you to write the code like that to use as a reference while troubleshooting.

Edit: I do want to mention that my current thought is that creating devices is unsupported in the scripting engine, as all documentation I’m able to find on it only ever mentions using it to build projects, not create them. You may be better off creating a Blueprint or macro device for your purposes here.

The code came from ChatGPT v3.5; it seemed to firmly believe that the code was correct. It talked about nodes, connections, and the like as a matter of fact.

ChatGPT v4 with Bing stated that it did not know how to do the same thing.

It is possible chatGPT v3.5 is confused; or that for some reason it has access to data v4 does not.

I’ve emailed Stephen (WM owner) about it. Waiting for a reply.

Okay, so a key thing to note about ChatGPT (and really any language model AI) is that it doesn’t “know” or “believe” anything. When it comes to code, especially, you can really start to see the predictive nature of the model kick in. It likely pulled that code from a different program entirely, or cobbled together something that looked correct based on the data it had about World Machine. Having used ChatGPT myself to help dip my toes into software development, I can tell you beyond any shadow of a doubt that while it is capable of writing useable code, a lot of the time it gets languages mixed up, or gets confused about what features are built-in to a language and what need to be added, etc. It especially seems to struggle with any sort of software specific language, which the automation scripts for World Machine are. ChatGPT can be a great tool, but it does have its limitations.

Now more than ever, I’m fairly positive that what you are attempting to do isn’t possible with the automation scripts. If you’re finding yourself doing those two steps every time you start a new project, however, you should be able to fairly easily create a blueprint or a macro, or even just edit the base startup project to suit your needs. Realistically, all three of those options would likely be faster/fewer clicks than the automation script anyway!

I definitely agree with what you have said; and will opt for your suggestions.

Thankyou for taking the time to reply.