  | | | dotNet | dotNet 2005-04-07 - By kim aldis
Back 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.0 Transitional//EN"> <HTML><HEAD><TITLE></TITLE> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD> <BODY text=#000000 bgColor=#ffffff> <DIV dir=ltr align=left><SPAN class=080154019-07042005><FONT face=Arial color=#0000ff size=2>you've unchecked the plugin?</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=080154019-07042005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV dir=ltr align=left><SPAN class=080154019-07042005></SPAN> </DIV><BR> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left> <HR tabIndex=-1> <FONT face=Tahoma size=2><B>From:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>On Behalf Of </B>Brad Friedman<BR><B>Sent:</B> 07 April 2005 18:47<BR><B>To:</B> XSI@(protected)<BR><B>Subject:</B> Re: dotNet<BR></FONT><BR></DIV> <DIV></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 dir=ltr align=left><SPAN class=859162814-06042005><FONT face=Arial color=#0000ff size=2>congratulations, although like I said, I've already confirmed this to work. ;-)</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=859162814-06042005></SPAN> </DIV> <DIV dir=ltr align=left><SPAN class=859162814-06042005><FONT face=Arial color=#0000ff size=2>to release the dll, go to the plugins manager and unload from there.</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=859162814-06042005></SPAN> </DIV> <DIV dir=ltr align=left><SPAN class=859162814-06042005><FONT face=Arial color=#0000ff size=2>Keep up the good work!</FONT></SPAN></DIV><BR> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left> <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>< /BODY></HTML>
|
|
 |