Open dotNet Form with Maxscript

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  04 April 2014
This code works fine!

fn test = (
local Assembly = dotNetClass "System.Reflection.Assembly"
local maxroot = pathConfig.GetDir #maxroot
Assembly.LoadFile (maxroot + "\Autodesk.Max.dll")
GlobalInterface = dotNetClass "Autodesk.Max.GlobalInterface"  
global MaxGlobal = GlobalInterface.Instance

test ()

 --finally send your control the correct params
Dialog  = dotNetObject "SplineAlign.SplineAlignDialog" MaxGlobal

Very Thanks!
  04 April 2014
Originally Posted by AlexeyGapon: Well it dose not work

-- Error occurred in anonymous codeblock; filename: D:\work\MyTutors\GardenWorker\Scripts\; position: 110; line: 4
 -- Runtime error: No constructor found which matched argument list: SplineAlign.SplineAlignDialog
 -- Error occurred in anonymous codeblock; filename: D:\work\MyTutors\GardenWorker\Scripts\; position: 140; line: 5
 -- Unknown property: "show" in undefined

Make sure that you have removed the params in your constructor, like in the code I posted:

public SplineAlignDialog()
	  global = GlobalInterface.Instance;

While it's cool that the maxscript way worked, there really is no need for the extra max scripting code. It is much better to keep as much in C# as possible, so do try and get the above method working. There may be a typo as I just wrote it in the browser, not in visual studio, but it should definitely work.
  04 April 2014
Did not even look at the SplineAlignDialog code :P Thx for clarifying Tim! i knew I wasn't too far off
Felipe Nogueira aka: PePeTD
Technical Artist/Character TD
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:24 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.