AssignName

Next
 From:  Rudl
9717.1 
Where must I place the AssignName Script. I get an error, when ich want to open it.



Attachments:

  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:  Frenchy Pilou (PILOU)
9717.2 In reply to 9717.1 
http://moi3d.com/forum/messages.php?webtag=MOI&msg=3830.4

All is explained...

It was for V2... don't know if it's working for upper versions!
  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:  Rudl
9717.3 
Thank you filou. Is there a version vor V4?
  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:  Frenchy Pilou (PILOU)
9717.4 In reply to 9717.3 
There is an AssignPresetName for V3 http://moi3d.com/forum/index.php?webtag=MOI&msg=3830.8
who seems don't works for V4 !

(no names found in the PresetNames.txt list who is working in the V3 !!!)
  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:  nameless
9717.5 
This works for me and I am using the latest 4.0 beta. I fished it from one of Michael's posts I think.
Attachments:

  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:  Frenchy Pilou (PILOU)
9717.6 In reply to 9717.5 
Cool this one one works but you must have yet some objects named...
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  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
9717.7 In reply to 9717.1 
Hi Rudl,

re:
> Where must I place the AssignName Script. I get an error, when ich want to open it.

That error means that it is not installed in a location where MoI looks for command files.

There are 2 places you can install it to, either the commands sub-folder in the main install folder, or for v4 another option is in the Moi appdata commands folder. If you are using v4 the latter is recommended since that is a centralized location apart from any individual program version and so it will be found there when you install new versions.

To find your MoI appdata commands folder, go to your system's appdata folder which on Windows can be found by typing in %appdata% inside the start menu or Win+R Run dialog, or on Mac it's under ~/Library/Application Support.

Inside the system appdata folder go into the Moi folder, then inside there go to commands. That's where you want to copy the unzipped files into.

- 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:  Michael Gibson
9717.8 In reply to 9717.3 
Hi Rudl,

re:
> Thank you filou. Is there a version vor V4?

The regular version for AssignName already works on V4 so there is not any special v4 version needed.
You can find it at:
http://moi3d.com/forum/display.php?webtag=MOI&msg=3830.4

- 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:  Michael Gibson
9717.9 In reply to 9717.4 
Hi Pilou,

> There is an AssignPresetName for V3 http://moi3d.com/forum/index.php?webtag=MOI&msg=3830.8
> who seems don't works for V4 !
>
> (no names found in the PresetNames.txt list who is working in the V3 !!!)

In that same post find the link that says "EDIT2: see here for a version that will work on a Mac".

Then inside the file AssignPresetNameDialog.htm find the line that is setting the path to the PresetNames.txt file:

code:
	// This should find the commands folder on the Mac version.
	var filename = 'c:\\moi\\commands\\PresetNames.txt';						
						
	// On Windows it would be like this:						
	//var filename = 'c:\\Program Files (x86)\\MoI 3.0 beta Nov-6-2012\\commands\\PresetNames.txt';


Change that to the path to where you have the PresetNames.txt file so it can find it, like:

code:
	var filename = 'C:\\Users\\Michael\\AppData\\Roaming\\moi\\commands\\PresetNames.txt';


That's all that is needed to make it work with v4.

- 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:  Frenchy Pilou (PILOU)
9717.10 In reply to 9717.9 
Ok That works now ...some error from me ...the "\\" against "\" or "/" and some " '' " on the endlines ...etc...
Now i will make the French version! :)

PS AssignPresetName is sufficient...no need AssignName ?
  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
9717.11 In reply to 9717.10 
Hi Pilou,

re:
> PS AssignPresetName is sufficient...no need AssignName ?

AssignPresetName gets a list of names from a text file, while AssignName gets the list of names from named objects in the current file.

If you only use a certain set of names all the time, then yes AssignPresetName would be sufficient. If you have different ones for different projects then AssignName might be better.

- 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:  Frenchy Pilou (PILOU)
9717.12 In reply to 9717.11 
All works fine in French in V4 Beta when Names are assigned or existant
but when Names are not assigned or not existing i have that when I press OK !

http://moiscript.weebly.com/uploads/3/9/3/8/3938813/assignnamedialog.zip

EDITED: 10 Mar 2020 by PILOU

  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:  Rudl
9717.13 
Thank you very much Michael and Pilou.
  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
9717.14 In reply to 9717.12 
Hi Pilou,

re:
> All works fine in French in V4 Beta when Names are assigned or existant
> but when Names are not assigned or not existing i have that when I press OK !

If there are no names present then there is nothing for the command to do and no reason to run it.

- 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:  Frenchy Pilou (PILOU)
9717.15 In reply to 9717.14 
So this error message is an advice and must be not taken in count. OK / Cancel is sufficient?...
  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
9717.16 In reply to 9717.15 
Hi Pilou, that script error can be fixed by updating the EndDialog function in AssignNameDialog.htm to this:

code:
			function EndDialog()
			{
				val = false;

				if ( window['namelist'] )
					val = namelist.value;
				
				if ( !val )
					moiWindow.endDialog(-1);
				else
					moiWindow.endDialog(val);
			}


- 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:  Frenchy Pilou (PILOU)
9717.17 In reply to 9717.16 
Excellent! Now that works fine!

So the French versions updated! ;)

http://moiscript.weebly.com/assignname.html

http://moiscript.weebly.com/assignpresetname.html

EDITED: 10 Mar 2020 by PILOU

  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