From: JOCONDOR
Good morning everyone.
I'm creating a script for MOI3D.
The script, when selecting a line, should draw from a selection of different CSV files to create solids with IPE, HE, UPN, L, 2UPN cross-sections, etc. The script should also be able to decide the position of the solid relative to the line (above, below, right, left, centroid).
I tried, but I couldn't. This, however, I managed to do in SketchUp.
I'll also post the *.js and *.html scripts soon.
Attachments:
StructuralBeams.html
StructuralBeams.js
From: Michael Gibson
Hi Jo, it looks like there are a lot of errors in the script.
To start with the file StructuralBeams.html won't be loaded because MOI is expecting it to have a .htm file extension, not .html .
- Michael
From: JOCONDOR
Thanks for your reply. Where can I find documentation about the API and other things for MOI3D?
From: Michael Gibson
Hi JOCONDOR, there isn't any official API documentation but there are some things collected here:
http://moi3d.com/wiki/scripting
AI tools seem to have trouble making MOI scripts, either because of lack of documentation or not enough examples for them to train on.
They often seem to generate a bunch of wrong non-working code. I would recommend to not use one for trying to write MOI scripts.
- Michael
From: JOCONDOR
I'm getting help from the AI, and I'm having trouble. I've made some small improvements with the script. I'm attaching the files here.
Attachments:
GeneratoreProfili.htm
GeneratoreProfili.js
From: Michael Gibson
Hi JOCONDOR,
> I'm getting help from the AI, and I'm having trouble.
Could you describe the trouble?
- Michael
From: JOCONDOR
Hi Michael, the problem is this:
When I select a line, a menu should open that allows me to select the various HeA profiles, etc. Then, based on the one I choose, a solid with the chosen profile will be created from the line. Unfortunately, it doesn't work. I'm not a computer engineer, but a construction engineer. I don't have any programming language skills.
From: Michael Gibson
Hi JOCONDOR, I'm sorry but some programming language skills are a necessary prerequisite to be able to make MOI scripts.
AI tools do not seem to do a very good job making MOI scripts. I'm not exactly sure why that is, possibly there is not enough data for them to train on.
You may need to find a partner who does have some programming background to work on your project.
Or perhaps try the node editor, it is a type of simplified graphical programming language:
https://moi3d.com/wiki/Nodeeditor
- Michael
From: JOCONDOR
Thanks for the advice. I'll try to download the plugin.