Notifications
Clear all

[Closed] Setting up external editor – mxscom.exe readme.txt not helping

I’m been messing around successfully with maxscript lately. I have 3ds max 9 and today got fed up with the internal editor. Searching around for solutions I found this:

  [ http://www.scriptspot.com/3ds-max/tutorials/setting-up-ultra-edit-as-your-maxscript-editor ]( http://www.scriptspot.com/3ds-max/tutorials/setting-up-ultra-edit-as-your-maxscript-editor) 
  
  which i began to work through.  I had to download the mxscom.exe, which is no longer available thru the orginal site and got it as a zip file from a past thread:
  
    [ http://forums.cgsociety.org/showpost.php?p=3807810&postcount=21 ]( http://forums.cgsociety.org/showpost.php?p=3807810&postcount=21) 
    
    The scriptspot tutorial says that i need to deal with intalling the mxscom.exe first, the problem is i dont know what the readme.txt is saying:
    
    [b]This script and executable allows you to run scripts externally.
    Install for Crimson Editor

     0. Modify the entry in maxscript6.reg and or maxscript7.reg to point to the
        directory where your 3dsmax.exe resides.

[/b]>>> Just wondering if 6 and 7 refer to version number and since i have max 9, i dont want to start messing with this unless i know it wont mess things up?
    [b]
     1. Place "RegisterOLEControl.ms" into your <3dsmax\scripts\startup> folder.
    
    [/b]>> this seems easy enough
    
    [b] 2. Install the included registry file "maxscriptX.reg"
    
    [/b]>> ???? I guess i have to find the old file in RegEdit and replace it? I can't seem to find a file with that name ( as maxscrip7.reg says in a commnet: changng the last line to point to 3ds max location and double clicking it in windows explorer -- is that the "install"?)[b]
    
     3. Install Crimson Editor and Load it ([www.crimsoneditor.com]( http://www.crimsoneditor.com)) 
        (Crimson editor already comes with a syntax file created by Jeff Hanna)
     4. Place "mxscom.exe" into your crimson editor tools folder.
    [/b]
    >> the rest seems ok to follow
    
    Any pointers to how to deal with this intial OLE setup would be greatly appreciated.  I think this one is worth struggling through!
7 Replies
 JHN

Yes, I have successfully used notepad++ with the mxscom bridge. I used
http://www.scriptspot.com/3ds-max/dynamic-registration-with-mxscom
script to setup the connection.

I think I got it working right out the box. Now I use max2009, so I mainly use the new “proEditor”. I did find that I had to fiddle around in notepad++ with the syntax for passing arguments to the bridge exe, but I got it to work.

Try out the maxscript to dynamicly update the registry! And let us know!
-Johan

Yes, but they are example files, so you can open them up and save one of them out with a suffix of “9”. Just make sure you point all the paths to the right place…

       [b] 2. Install the included registry file "maxscriptX.reg"
       
       [/b]>> ???? I guess i have to find the old file in RegEdit and replace it? I can't seem to find a file with that name ( as maxscrip7.reg says in a commnet: changng the last line to point to 3ds max location and double clicking it in windows explorer -- is that the "install"?)

If I recall, you should be able to right click the file and select “merge” or “install” I think.

Here’s an example script I use to use to make sure that everything was registered correctly on max startup, Took some playing around with, but was great for switching between max 8 and max 9


 (
 	clearlistener()
 	print ""
 	local version = (maxversion())[1] / 1000
 	
 	local outstr = createFile "$scripts/register_mxscom.reg"
 	format "REGEDIT																									  
"		 to: outstr
 	format "HKEY_CLASSES_ROOT\MAX.Application = OLE Automation MAX Application										   
"		 to: outstr
 	format "HKEY_CLASSES_ROOT\MAX.Application\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}							 
"		 to: outstr
 	format "HKEY_CLASSES_ROOT\MAX.Application\CurVer = MAX.Application.%												 
" version to: outstr
 	format ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;																			   
"		 to: outstr
 	format ";; registration info MAX %.0																				 
" version to: outstr
 	format "; (Application Object)																					   
"		 to: outstr
 	format "HKEY_CLASSES_ROOT\MAX.Application.% = OLE Automation MAX %.0 Application									 
" version version to: outstr
 	format "HKEY_CLASSES_ROOT\MAX.Application.%\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}						   
" version to: outstr
 	format "HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3} = OLE Automation MAX %.0 Application		  
" version to: outstr
 	format "HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\ProgID = MAX.Application.%					
" version to: outstr
 	format "HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\VersionIndependentProgID = MAX.Application	
"		 to: outstr
 	local executablePath =(getdir #maxroot) + "3dsmax" + (version as string )+ ".exe"												
 	format "HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\LocalServer32 = %
" executablePath					   to: outstr
 	
 	flush outstr
 	close outstr
 	
 	local regPath = (getdir #maxroot) + "\\scripts\\register_mxscom.reg"
 
 	doscommand regPath 
 	
 	deleteFile "$scripts\\register_mxscom.reg"
 	
 	print "Registering Max as an OLE Interface"
 	-- registers running of files and executing script code to OLE.
 	registerOLEInterface #( filein, execute, edit, encryptscript )
 )

I take absolutely no credit for it, as I stole it from someone else…can’t remember who…(sorry)

Shane

ed: JNH is pointing to the same script, so use that one

OK! thanks for those replies JHN, RustyKnight, i allllmost have it working. When max starts the listener says that its registered as an OLE interface, and i have UltraEdit talking to max the only problem is when i exectute the code in UltraEdit, in max i get:

“run-time error ‘429’ ActiveX component can’t create object 3ds max”

I tried looking this up on google, but was only pointed to a lot of different patches to do with MS Office and Microsoft programs in general. Any ideas what this fix is?

1 Reply
(@vscourge)
Joined: 10 months ago

Posts: 0

Are you using Vista bychance? If so, turn off UAC (User Account Control). That caused several mysterious COM problems for me until I disabled it. Something to do with trusted and untrusted apps wanting to talk to each other, etc.

Okay, can’t say I’ve ever had the error before…

Could it be the script??

Shane

Installed it this morning at it all works fine.

Windows XP x64
Max 9 x64

Shane

I am on Windows XP SP2. Thanks for exploring the problem a bit.

When i get a chance i will try to write up a tutorial that summarizes what to do for people around here who are still using the old maxscript editor, although it might lead to the same error for other people, but perhaps not if its a problem with my windows configuration. That would be one way to find out anyway.

I must say, even having to copy paste into max when i want to run a code is still better than the old way with essentially no color coded help and indentation – ill make sure to post some screen shots when writing up the tutorial to convince others.