CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
reply share thread « Previous Thread | Next Thread »
Thread Tools Search this Thread Display Modes
Old 04-16-2014, 02:52 PM   #16
AlexeyGapon's Avatar
Alexey Gapon
Kiev, Ukraine
Join Date: Mar 2013
Posts: 41
Send a message via ICQ to AlexeyGapon
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 Dialog.Show()

Very Thanks!
Old 04-16-2014, 03:09 PM   #17
Tim Hawker
CGI Artist
Join Date: May 2007
Posts: 142
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.
Old 04-16-2014, 05:20 PM   #18
The One and Only
PePeTD's Avatar
Felipe Nogueira
Technical Artist
Bethesda Softworks
Rockville, USA
Join Date: Jul 2008
Posts: 208
Send a message via ICQ to PePeTD Send a message via MSN to PePeTD
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:11 PM.

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