From: Rudl
Where must I place the AssignName Script. I get an error, when ich want to open it.
Image Attachments:
1.jpg
From: Frenchy Pilou (PILOU)
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!
From: Rudl
Thank you filou. Is there a version vor V4?
From: Frenchy Pilou (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 !!!)
From: nameless
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:
AssignName.zip
From: Frenchy Pilou (PILOU)
Cool this one one works but you must have yet some objects named...
From: Michael Gibson
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
From: Michael Gibson
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
From: Michael Gibson
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
From: Frenchy Pilou (PILOU)
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 ?
From: Michael Gibson
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
From: Frenchy Pilou (PILOU)
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
From: Rudl
Thank you very much Michael and Pilou.
From: Michael Gibson
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
From: Frenchy Pilou (PILOU)
So this error message is an advice and must be not taken in count. OK / Cancel is sufficient?...
From: Michael Gibson
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
From: Frenchy Pilou (PILOU)
Excellent! Now that works fine!
So the French versions updated! ;)
http://moiscript.weebly.com/assignname.html
http://moiscript.weebly.com/assignpresetname.html