MoI discussion forum
MoI discussion forum

Full Version: V4 released!

Show messages:  1-4  …  105-124  125-144  145-164  165-184  185-188

From: Michael Gibson
21 May 2021   [#165] In reply to [#164]
Hi Booleano, I'm sorry I don't understand.

Is it correct that you are working on a dialog box that has command buttons in it?

If so can you please post the .htm file for your dialog here?

- Michael
From: Booleano
21 May 2021   [#166] In reply to [#165]
Hi Michael

I apologize for not being able to express what I really need.

I attach 2 files that are:
"Script.txt" where the scripts that each icon in the attached image "Styles.jpg" and its corresponding code are indicated (it is written as it would be added as a keyboard shortcut).

"SidePane1.htm" is the current file of the pop-up window of the image "Styles.jpg", where the 3 icons of the file "Script.txt" are already added

I hope this time you understand what I want to do.

And the file "SidePane1.htm" that I need you to modify, I suppose it will help me to know how to add possible useful scripts for me.

And I thank you again for your invaluable help.

Attachments:
Scripts.txt
SidePane1.htm

Image Attachments:
Styles.jpg 


From: Michael Gibson
22 May 2021   [#167] In reply to [#166]
Hi Booleano, so for the icons you need to make each icon image into its own separate file. Usually the icons are 64 width 64 height PNG image files.

Then copy your 3 new icon image files into the "icons" sub-folder inside the ui folder. Then you'll be able to use them in a command button.

For running those scripts, step #1 is to modify your SidePane1.htm file to add a <head> section, usually <style> and <script> go in the <head> section of an html file.

So that would look like this:

code:
<html>

	<head>

		<style>
			/* Turn off text block under command button icon */
			moi\:CommandButton > div {
				display:none;
			}
			/* Cambio de tamaño de los iconos */
			moi\:CommandButton > img, moi\:CommandMenuButton > img, moi\:CommandSplitButton > img {
			width:8em;
			height:8em;
			}
		</style>

	</head>

	<body class="SidePaneBody">
              ....


Now add a <script> section inside the <head> after the <style>:
code:
<html>

	<head>

		<style>
			/* Turn off text block under command button icon */
			moi\:CommandButton > div {
				display:none;
			}
			/* Cambio de tamaño de los iconos */
			moi\:CommandButton > img, moi\:CommandMenuButton > img, moi\:CommandSplitButton > img {
			width:8em;
			height:8em;
			}
		</style>

		<script>

		</script>

	</head>


Then inside the <script></script> section you can add functions that contain script code:

code:
		<script>
			function ScriptCodeFunction1()
			{

			}
		</script>


copy the script code from your Scripts.txt inside the function, in between { }.

To make a command button call the script function, put in an onclick="" attribute in the moi:CommandButton element, like this:

<moi:CommandButton icon="icons/icon_filename.png" onclick="ScriptCodeFunction1()">Text here</moi:CommandButton>

You can remove the command="" attribute from these particular 3 buttons, they will be calling script code inside this same file instead of running a command.

Let me know if you're still stuck.

- Michael
From: Booleano
23 May 2021   [#168] In reply to [#167]
Hi Michael.

Understood everything perfectly.

My pop-up window is only going to have little-used scripts, it is very overwhelming to remember 20-40 keyboard shortcuts, at least for me, that's why I needed this.
So once again thank you very much.
You can tell me where I can check the syntax of the version in which the MOI scripts are written.
For many years now, I was programming in C ++, Borland's version for MS-DOS (Windoss did not yet exist), and it would be useful for me to at least know how to modify some script, without going crazy.

If I need to add more sripts they will all be in a red box, to know that they are not tools.

Image Attachments:
MOI_V_2.JPG 


From: Michael Gibson
23 May 2021   [#169] In reply to [#168]
Hi Booleano,

re:
> You can tell me where I can check the syntax of the version in which the MOI scripts are written.

There isn't really a place currently where that can be checked other than by running it in MoI.

In the future i would like to work on a built in script editor that would help make it easier to write and debug scripts. It wiill take a lot of effort to make it though.

- Michael
From: Booleano
23 May 2021   [#170] In reply to [#169]
Hi Michael.

I really think that I would only need the necessary Java version, and I would search the Internet for the information I need.
I will never write a script, only on occasion would I modify an existing one.

Thanks.
From: Michael Gibson
23 May 2021   [#171] In reply to [#170]
Hi Booleano, the script language version that MoI uses is called JavaScript and the specific version name is called ECMAScript v5 .

- Michael
From: Booleano
24 May 2021   [#172] In reply to [#171]
Hi Michael.

Thank you
From: Mindset (IGNITER)
4 Jun 2021   [#173]
Don't understand what gives here:




MindSet

Image Attachments:
Screenshot 2021-06-04 005006.png 


From: Frenchy Pilou (PILOU)
4 Jun 2021   [#174] In reply to [#173]
As you can edit Dimension Text anything can be writed!

or can be also an perspective effect!

etc...
From: Mindset (IGNITER)
4 Jun 2021   [#175] In reply to [#174]
So, it really doesn't offer measurements as fractions?
Hmm, maybe that makes sense; thought I was doing something wrong... both examples are coplanar.

Thanks!
From: Michael Gibson
4 Jun 2021   [#176] In reply to [#173]
Hi Mindset,

> Don't understand what gives here:

Dimension values are rounded using the setting under Formatting > "Decimal display" for decimals and Formatting > "Fractional display" for feet & inches.

So if you want to display a fraction less than that you'll need to set the display precision to be tighter. You can set the default used for new dims under Options > Dimensions, and you can set the properties for existing ones by selecting it and pushing "Details...".

If you're still having a problem can you please post the .3dm model file with your dim in it so I can take a look.

- Michael
From: neilwilson3412
12 Jun 2021   [#177] In reply to [#1]
im loving it!!!! performance is great and so stable!


From: Michael Gibson
24 Jul 2021   [#178]
Ok, I finally got back to tuning up the web site a little more and there is now a "what's new" page for V4 here:
http://moi3d.com/4.0/whatsnew.htm

- Michael
From: Frenchy Pilou (PILOU)
25 Jul 2021   [#179] In reply to [#178]
Super!
From: LarryV
23 Dec 2021   [#180]
Hello Michael, everyone, I'd like to ask whether there are incremental updates to V4 since its initial non-beta release. The reason why I'm asking is because I upgraded to V4 pretty early on and I was wondering if there have been any minor version updates released since which I may be missing.

Thank you!
From: Michael Gibson
23 Dec 2021   [#181] In reply to [#180]
Hi Larry, no there haven't been any upgrades to v4 as of yet. I am hoping to start v5 betas soon, sorry it's taking a while to get that started.

- Michael
From: LarryV
3 Jan 2022   [#182] In reply to [#181]
Hello Michael!

Happy New Year to you and yours and everyone and everyone's here!

As far as I'm concerned, please take your time. You did exceptional work with both V3 and V4. I especially love V4! I only asked about minor version increments since I like to stay up to date with my software. V5 will be done when it's done.

Have an awesome 2022!

- Larry.
From: Michael Gibson
3 Jan 2022   [#183] In reply to [#182]
Thanks Larry, Happy New Year!

- Michael
From: Lewis3D
4 Mar 2022   [#184]
Hi there,

I can't get "Ext.Scripts" button to appear in my moi v4 GUI, I get it in the MOI v3 (but it's 32 bit so can't use it for bigger objects anymore) but whatever i do copy/paste scripts/ui stuff from v3 i to v4 i still can't get the button show up in moi v4 :(.

Can someone point me to example how to do that in moi v4 ?

Thanks

Show messages:  1-4  …  105-124  125-144  145-164  165-184  185-188