Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
dotNet

dotNet

2005-04-07       - By kim aldis

 Back
Reply:     1     2     3     4     5     6     7     8  

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>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=080154019-07042005></SPAN>&nbsp;</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... ?&nbsp; <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>&nbsp;</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>&nbsp;</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.&nbsp; 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>&nbsp;* Created by SharpDevelop.<BR>&nbsp;*
     User: leith<BR>&nbsp;* Date: 4/6/2005<BR>&nbsp;* Time: 8:55 AM<BR>&nbsp;*
     <BR>&nbsp;* To change this template use Tools | Options | Coding | Edit
     Standard Headers.<BR>&nbsp;*/<BR><BR><BR>using System;<BR>using
     System.Runtime.InteropServices;<BR>using XSI =
     SI3DOBJECTMODELLIB;<BR>namespace
     XSIHelloWorld<BR>{<BR><BR>&nbsp;&nbsp;&nbsp; public interface
     IXSIHelloWorld{<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
     <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; void
     callMe();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;
     }<BR><BR>&nbsp;&nbsp;&nbsp;
     [ClassInterface(ClassInterfaceType.AutoDual)]<BR>&nbsp;&nbsp;&nbsp;
public
     class XSIHelloWorld : IXSIHelloWorld{<BR>&nbsp;&nbsp;&nbsp;
     &nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void
     callMe(){<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
     XSI.CXSIApplicationClass app = new
     XSI.CXSIApplicationClass();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
     &nbsp;&nbsp;&nbsp; ((XSI.Application) app).LogMessage("HELLO XSI WORLD!",
     XSI.siSeverity.siInfo);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
     &nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
     }<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;
     }<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.&nbsp; Wow.&nbsp; AWESOME!&nbsp;
     WOO HOO!&nbsp; 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.&nbsp; Then I'll publish it to make it
     accessible.<BR><BR>BTW, I have run into one slightly annoying
     problem.&nbsp; Once you create the activex object, XSI holds onto it and
     makes recompiling the DLL impossible until you close XSI.&nbsp; What
would
     be the best way to force the activex object to be destroyed and get the
     DLL unloaded?&nbsp; So I can keep from having to reload XSI every time I
     want to compile?&nbsp; Or is this impossible?&nbsp; Any
     thoughts?<BR><BR>-brad<BR></BLOCKQUOTE></BLOCKQUOTE><BR></BLOCKQUOTE><
/BODY></HTML>