to DeskProto home page
looking glass icon
to DeskProto Facebook page
to DeskProto Google Plus page
to DeskProto Youtube page

Forum menu:

DeskProto user forum

Forum: communicate with other users.

Forum home page main
Integration DeskProto with the MoI CAD program
You’re logged in as:guest
Online users:0
Online guests:63

16:01 CEST

From several DeskProto users we have heard very enthusiastic stories about MoI: Moment of Inspiration, which is a lowcost and easy-to-use 3D CAD program.

Like any 3D CAD program MoI offers STL export, so integration with DeskProto is easy. Some users nevertheless prefer an even easier integration, which can be done by adding a DeskProto button to MoI.
And that appears to be quite easy: see the instructions below.

You will need:
- an image file for the button (64x64 pixels), we used DeskProtoIcon.png, shown above. Save that using a right mouse click and 'Save picture as'
- a code snippet to be copied into the MoI code, see below.


1. Copy the image file [DeskProtoIcon.png] to
C:Program Files\MoI 2.0\ui\icons
(or the appropriate path name for MoI trial or for a different version).

2. Open in a plain text editor file
C:Program Files\MoI 2.0\ui\CommandBar.htm
The last default button to be defined in this code is the Object Snap button.
Insert the appropriate code snippet immediately after the code for the Object Snap button and then save this HTM file.
You can see what needs to be done in one of the illustrations later in this forum thread.

When you now start MOI the new DeskProto icon should be present. It will select all geometry, export it as STL file and then start DeskProto with this STL file loaded.

Important is that the button always uses the same STL filename. So when you use the button for a second project, the first STL file will be deleted. This means that saving the DeskProto project is not useful, as when you later again open that project the STL geometry may have changed.

16:15 CEST

Here is the illustration for MOI V2.0, with code snippets.

For DeskProto V6.0 the code snippet is:

<!-- Start code for DeskProto button, by Delft Spline Systems -->

Oops, scripts are not permitted on the forum, so the code snippets do not come through.

So I have made a ZIP file containing the icon file and these four code snippet files:
You can download the file (10 Kb) here.

16:25 CEST

And finally the illustration for MoI V3.0.


16:55 CEST

MoI screen

16:56 CEST

And here after pressing the DP button.

12:08 CEST
The button code already has been improved, thanks to MoI programmer Michael :-)

The code snippets and the images above have been updated.

13:12 CET

If is of course very well possible to adapt the button script code according to your needs.

The example above (made by German reseller Filou) makes the name of each saved STL file unique by adding date and time to the filename. Then the file will not be deleted the next time that MOI's DeskProto button is pressed, which makes it possible to save the DeskProto project.

Feel free to change the button script to make it do exactly what you want: scripting is a very powerful tool !

14:21 CEST
Hi Lex
I am new in DeskProto, can you please tell me which editor do you use to write the scripts.
Thank you so much

16:37 CEST
Hi Lam,
You can use any plain text editor.
I use both Textpad (a quite old license) and Notepad++.