DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

diadem and c#

I would like to link Diadem and a C# DLL ( Class) for a particular job. The class already exists, and i would prefer to have to rewrite anything. How can i call this DLL in a DIADEM script
Thanks for answer
 
CCR1
0 Kudos
Message 1 of 5
(4,517 Views)

I haven't tried this yet, so I'm only going to be able to answer in approximate terms.  It should be possible to create a class factory using C#.  If you do that, and register the class factory, then you might be able to use "CreateObject" with the ProgID of your class in VBScript to create an object from which to access your functionality.  Likewise if you are creating a GUI component, you might be able to embed it using SUD's ActiveX container.

Unless somebody else knows more, you're going to have to figure out the details yourself though.

I hope this at least helps a little,

Myrle

******************
For tips and tricks on creating VBScript DataPlugins go to http://dataplugins.blogspot.com.
0 Kudos
Message 2 of 5
(4,490 Views)

Hello CCR1!

The keyword is 'COM Callable Wrapper' or short 'CCW'. Just have a look at 'Exposing .NET Components to COM' to get the details you need. In DIAdem you can test the sample with this code:

Option Explicit
 
Dim oTester
 
Set oTester = CreateObject("Tester.Numbers")
 
MsgBox oTester.GetDay()
 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
Message 3 of 5
(4,465 Views)
Hello,
CCR is very happy with your answer, I have tried the example and it works very well. I have now, just to continue with Daidem and C#  and achive my Goal.
 
Many thanks,
Smiley Happy
CCR1
0 Kudos
Message 4 of 5
(4,417 Views)
Hello CCR1!
 
I'm happy that you are happy!
 
One Note: It's a good custom to rate helpful responses! Smiley Wink
 
Matthias

Message Edited by Twigeater on 12-14-2006 08:57 AM

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 5 of 5
(4,400 Views)