SCRIPT IN MOI3D

Next
 From:  JOCONDOR
12005.1 
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.

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
12005.2 In reply to 12005.1 
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  JOCONDOR
12005.3 In reply to 12005.2 
Thanks for your reply. Where can I find documentation about the API and other things for MOI3D?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
12005.4 In reply to 12005.3 
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  JOCONDOR
12005.5 In reply to 12005.4 
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.

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
12005.6 In reply to 12005.5 
Hi JOCONDOR,

> I'm getting help from the AI, and I'm having trouble.

Could you describe the trouble?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  JOCONDOR
12005.7 In reply to 12005.6 
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.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
12005.8 In reply to 12005.7 
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  JOCONDOR
12005.9 In reply to 12005.8 
Thanks for the advice. I'll try to download the plugin.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All