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
Veteran
 
AlexeyGapon's Avatar
portfolio
Alexey Gapon
Kiev, Ukraine
 
Join Date: Mar 2013
Posts: 41
Send a message via ICQ to AlexeyGapon
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-16-2014, 03:09 PM   #17
TimHawker
Frequenter
portfolio
Tim Hawker
CGI Artist
RTT AG
Germany
 
Join Date: May 2007
Posts: 142
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-16-2014, 05:20 PM   #18
PePeTD
The One and Only
 
PePeTD's Avatar
portfolio
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
http://felipenogueira3d.com
 
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
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:53 AM.


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