  | | | dotNet | dotNet 2005-04-15 - By Brad Friedman
Back As stated previously, I was about to try and put this up on XSIBase in the tools section. However, much to my dismay, I can't find a good fit for it in the categories.
http://xsi.fie.us/xsiDotNetUtil/
Bascially, its a utility library for programming to XSI in dotNet. Also its a set of tips and tricks for programming in dotNet for XSI with the library. I don't think this qualifies as a plugin. I don't think it qualifies under any of the scripting categories. Its not an external tool either. If anyone has and idea as to where it should go, I'm all ears :)
In the meantime, since this library and dotNet have been mentioned here before I thought I'd just share that I've got some basic startup tips and tricks up at the site. For example: getting the XSIApplication object. Getting XSI to give you a stack trace on error. If anyone is interested in the subject.
-brad
Brad Friedman wrote:
> just a note: > > I've set up a quick utility library that I intend to maintain and > expand upon: > > http://xsi.fie.us/xsiDotNetUtil/ > > Right now its super tiny and has less than 10 functions in it. As I > move through my development on my current project, this library will > grow. If anyone else is working in c# and wants to contribute to this > library, just send code my way and I'll merge it in. > > Once this library reaches a level of funtionality that I think its > worth publishing further, I'll throw it up on XSIBase. > > -brad > > Brad Friedman wrote: > >> there's no plugin to uncheck. I'm just creating an activeX object in >> the script editor and calling a function. no commands involved. >> >> I'm going to play with the IDisposable interface and see if that gets >> me anything. >> >> -brad >> >> kim aldis wrote: >> >>> you've unchecked the plugin? >>> >>> >>> >>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- >>> *From:* owner-xsi@(protected) [mailto:owner-xsi@(protected)] >>> *On Behalf Of *Brad Friedman >>> *Sent:* 07 April 2005 18:47 >>> *To:* XSI@(protected) >>> *Subject:* Re: dotNet >>> >>> hrm... this isn't working. >>> >>> just running something like this in the script editor: >>> >>> [code] >>> var obj = new ActiveXObject("FIEMuscleSystem2.SimplePolyMuscle"); >>> obj.pickMuscleCurve(); >>> [/code] >>> >>> it runs fine but once its run I can't seem to free the dll. >>> >>> I used the "Unload Unused ActiveX" button in the plugin manager >>> but it doesn't seem to be doing any good. >>> >>> I'm not doing anything with self installing plugins (yet) so >>> there is nothing to explicitly unload. >>> >>> Anyone have an idea as to how to force this? >>> >>> I wonder if this is a dotnet garbage collection issue... ? >>> >>> -brad >>> >>> kim aldis wrote: >>> >>>> congratulations, although like I said, I've already confirmed >>>> this to work. ;-) >>>> >>>> to release the dll, go to the plugins manager and unload from >>>> there. >>>> >>>> Keep up the good work! >>>> >>>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- -- --- >>>> *From:* owner-xsi@(protected) >>>> [mailto:owner-xsi@(protected)] *On Behalf Of *Brad Friedman >>>> *Sent:* 06 April 2005 15:19 >>>> *To:* XSI@(protected) >>>> *Subject:* Re: dotNet >>>> >>>> Brad Friedman wrote: >>>> >>>>> >>>>> I'm going to try giving this stuff a run in the next few >>>>> days. If I get a LogMessage("HelloXSIWorld") functioning >>>>> from c# I'm sure you'll hear from me :) >>>>> >>>> You are now hearing from me :) >>>> >>>> It works. >>>> >>>> In otherwords... I got the following .cs file to work. >>>> >>>> [code] >>>> /* >>>> * Created by SharpDevelop. >>>> * User: leith >>>> * Date: 4/6/2005 >>>> * Time: 8:55 AM >>>> * >>>> * To change this template use Tools | Options | Coding | >>>> Edit Standard Headers. >>>> */ >>>> >>>> >>>> using System; >>>> using System.Runtime.InteropServices; >>>> using XSI = SI3DOBJECTMODELLIB; >>>> namespace XSIHelloWorld >>>> { >>>> >>>> public interface IXSIHelloWorld{ >>>> >>>> void callMe(); >>>> >>>> } >>>> >>>> [ClassInterface(ClassInterfaceType.AutoDual)] >>>> public class XSIHelloWorld : IXSIHelloWorld{ >>>> >>>> public void callMe(){ >>>> XSI.CXSIApplicationClass app = new >>>> XSI.CXSIApplicationClass(); >>>> ((XSI.Application) app).LogMessage("HELLO XSI >>>> WORLD!", XSI.siSeverity.siInfo); >>>> >>>> } >>>> >>>> } >>>> } >>>> [/code] >>>> >>>> The important thing here is that the c# code is calling >>>> into the XSI COM type libraries directly and is being >>>> called through scripting. >>>> >>>> So umm... yea. Wow. AWESOME! WOO HOO! HOORAY! >>>> >>>> I'm going to spend some time over the next few days trying >>>> to streamline this execution environment to make it easy to >>>> install and all that jazz. Then I'll publish it to make it >>>> accessible. >>>> >>>> BTW, I have run into one slightly annoying problem. Once >>>> you create the activex object, XSI holds onto it and makes >>>> recompiling the DLL impossible until you close XSI. What >>>> would be the best way to force the activex object to be >>>> destroyed and get the DLL unloaded? So I can keep from >>>> having to reload XSI every time I want to compile? Or is >>>> this impossible? Any thoughts? >>>> >>>> -brad >>>> >>> >> >
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> As stated previously, I was about to try and put this up on XSIBase in the tools section. However, much to my dismay, I can't find a good fit for it in the categories.<br> <br> <a class="moz-txt-link-freetext" href="http://xsi.fie.us/xsiDotNetUtil/">http:/ /xsi.fie.us/xsiDotNetUtil/</a><br> <br> Bascially, its a utility library for programming to XSI in dotNet. Also its a set of tips and tricks for programming in dotNet for XSI with the library. I don't think this qualifies as a plugin. I don't think it qualifies under any of the scripting categories. Its not an external tool either. If anyone has and idea as to where it should go, I'm all ears :)<br> <br> In the meantime, since this library and dotNet have been mentioned here before I thought I'd just share that I've got some basic startup tips and tricks up at the site. For example: getting the XSIApplication object. Getting XSI to give you a stack trace on error. If anyone is interested in the subject.<br> <br> -brad<br> <br> Brad Friedman wrote: <blockquote cite="mid42582E9F.3070600@(protected)" type="cite"> <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type"> <title></title> just a note:<br> <br> I've set up a quick utility library that I intend to maintain and expand upon:<br> <br> <a class="moz-txt-link-freetext" href="http://xsi.fie.us/xsiDotNetUtil/">http://xsi.fie.us/xsiDotNetUtil/</a> <br> <br> Right now its super tiny and has less than 10 functions in it. As I move through my development on my current project, this library will grow. If anyone else is working in c# and wants to contribute to this library, just send code my way and I'll merge it in.<br> <br> Once this library reaches a level of funtionality that I think its worth publishing further, I'll throw it up on XSIBase.<br> <br> -brad<br> <br> Brad Friedman wrote: <blockquote cite="mid42559048.7080606@(protected)" type="cite"> <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type"> <title></title> there's no plugin to uncheck. I'm just creating an activeX object in the script editor and calling a function. no commands involved.<br> <br> I'm going to play with the IDisposable interface and see if that gets me anything.<br> <br> -brad<br> <br> kim aldis wrote: <blockquote cite="mid200504071926.j37JQpPm020363@(protected)" type="cite"> <title></title> <meta http-equiv="Content-Type" content="text/html; "> <meta content="MSHTML 6.00.2800.1106" name="GENERATOR"> <div align="left" dir="ltr"><span class="080154019-07042005"><font color="#0000ff" face="Arial" size="2">you've unchecked the plugin?</font>< /span></div> <div align="left" dir="ltr"><span class="080154019-07042005"></span>  ;</div> <div align="left" dir="ltr"><span class="080154019-07042005"></span>  ;</div> <br> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div class="OutlookMessageHeader" align="left" dir="ltr" lang="en-us"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:owner-xsi@(protected)">owner -xsi@(protected)</a> [<a class="moz-txt-link-freetext" href="mailto:owner-xsi@(protected)">mailto :owner-xsi@(protected)</a>] <b>On Behalf Of </b>Brad Friedman<br> <b>Sent:</b> 07 April 2005 18:47<br> <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:XSI@(protected)">XSI@(protected)</a><br> <b>Subject:</b> Re: dotNet<br> </font><br> </div> hrm... this isn't working.<br> <br> just running something like this in the script editor:<br> <br> [code]<br> var obj = new ActiveXObject("FIEMuscleSystem2.SimplePolyMuscle");<br> obj.pickMuscleCurve();<br> [/code]<br> <br> it runs fine but once its run I can't seem to free the dll.<br> <br> I used the "Unload Unused ActiveX" button in the plugin manager but it doesn't seem to be doing any good.<br> <br> I'm not doing anything with self installing plugins (yet) so there is nothing to explicitly unload.<br> <br> Anyone have an idea as to how to force this?<br> <br> I wonder if this is a dotnet garbage collection issue... ? <br> <br> -brad<br> <br> kim aldis wrote: <blockquote cite="mid200504061415.j36EFlPm005685@(protected)" type="cite"> <meta content="MSHTML 6.00.2800.1106" name="GENERATOR"> <div align="left" dir="ltr"><span class="859162814-06042005"><font color="#0000ff" face="Arial" size="2">congratulations, although like I said, I've already confirmed this to work. ;-)</font></span></div> <div align="left" dir="ltr"><span class="859162814-06042005"></span> </div> <div align="left" dir="ltr"><span class="859162814-06042005"><font color="#0000ff" face="Arial" size="2">to release the dll, go to the plugins manager and unload from there.</font></span></div> <div align="left" dir="ltr"><span class="859162814-06042005"></span> </div> <div align="left" dir="ltr"><span class="859162814-06042005"><font color="#0000ff" face="Arial" size="2">Keep up the good work!</font></span>< /div> <br> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div class="OutlookMessageHeader" align="left" dir="ltr" lang="en-us"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:owner-xsi@(protected)">owner-xsi@(protected)</a> [<a class="moz-txt-link-freetext" href="mailto:owner-xsi@(protected)">mailto :owner-xsi@(protected)</a>] <b>On Behalf Of </b>Brad Friedman<br> <b>Sent:</b> 06 April 2005 15:19<br> <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:XSI@(protected)">XSI@(protected)</a><br> <b>Subject:</b> Re: dotNet<br> </font><br> </div> Brad Friedman wrote: <blockquote cite="mid42531100.5080804@(protected)" type="cite"><span class="MsgViewAlternateBody"><br> I'm going to try giving this stuff a run in the next few days. If I get a LogMessage("HelloXSIWorld") functioning from c# I'm sure you'll hear from me :)<br> <br> </span></blockquote> You are now hearing from me :)<br> <br> It works.<br> <br> In otherwords... I got the following .cs file to work.<br> <br> [code]<br> /*<br> * Created by SharpDevelop.<br> * User: leith<br> * Date: 4/6/2005<br> * Time: 8:55 AM<br> * <br> * To change this template use Tools | Options | Coding | Edit Standard Headers.<br> */<br> <br> <br> using System;<br> using System.Runtime.InteropServices;<br> using XSI = SI3DOBJECTMODELLIB;<br> namespace XSIHelloWorld<br> {<br> <br> public interface IXSIHelloWorld{<br> <br> void callMe();<br> <br> }<br> <br> [ClassInterface(ClassInterfaceType.AutoDual)]<br> public class XSIHelloWorld : IXSIHelloWorld{<br> <br> public void callMe(){<br> XSI .CXSIApplicationClass app = new XSI.CXSIApplicationClass();<br> ((XSI.Application) app ).LogMessage("HELLO XSI WORLD!", XSI.siSeverity.siInfo);<br> <br> }<br> <br> }<br> }<br> [/code]<br> <br> The important thing here is that the c# code is calling into the XSI COM type libraries directly and is being called through scripting.<br> <br> So umm... yea. Wow. AWESOME! WOO HOO! HOORAY!<br> <br> I'm going to spend some time over the next few days trying to streamline this execution environment to make it easy to install and all that jazz. Then I'll publish it to make it accessible.<br> <br> BTW, I have run into one slightly annoying problem. Once you create the activex object, XSI holds onto it and makes recompiling the DLL impossible until you close XSI. What would be the best way to force the activex object to be destroyed and get the DLL unloaded? So I can keep from having to reload XSI every time I want to compile? Or is this impossible? Any thoughts?<br> <br> -brad<br> </blockquote> </blockquote> <br> </blockquote> </blockquote> <br> </blockquote> <br> </blockquote> <br> </body> </html>
|
|
 |