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!

REPLY TO THREAD
 
Thread Tools Search this Thread Display Modes
Old 04 April 2014   #16
This code works fine!

Code:
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 Dialog.Show()


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



Code:
-- Error occurred in anonymous codeblock; filename: D:\work\MyTutors\GardenWorker\Scripts\1.ms; 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\1.ms; 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:
Code:
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.
 
Old 04 April 2014   #18
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
http://felipenogueira3d.com
 
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 08:56 AM.


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