.Net User EFI interface
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
.Net User EFI interface
Sources: https://github.com/ViacheslavMezentsev/NetEFI
[26-06-2014]
- only for 32-bit systems;
- mc15 & mp3 supported (mp3 can't get string value for now);
- only .net 2.0 supported;
- examples for vs2008.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Updated.
Now 3 test projects available: c#, vb.net and c++/cli. All based on .net 2.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mathcad Prime 10.0 x64 also supported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Updated.
- echo functions added;
- small changes.
Simple examples are attached (pdf files).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great work!
Thanks for sharing!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks.
If someone will write JSON codec as a program, it will allow to exchange of data (between Mathcad and dll) in any format, using strings (nested arrays, for example.).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Updated.
- error handling added (only one function in the assembly may contain a static field Errors - array of strings).
For example:
using System;
public partial class cserror {
public static String[] Errors = {
"cserror 1",
"cserror 2",
"cserror 3",
"cserror 4"
};
}
How to use:
using System;
using NetEFI;
public partial class cserror: IFunction {
public FunctionInfo Info {
get {
return new FunctionInfo( "cserror", "n", "return error string",
typeof( String ), new[] { typeof( TComplex ) } );
}
}
public FunctionInfo GetFunctionInfo( string lang ) { return Info; }
public bool NumericEvaluation( object[] args, out object result ) {
throw new EFIException( ( int ) ( ( TComplex ) args[0] ).Real, 1 );
}
}
EFIException( ErrNum, ArgNum) - like in MAKELRESULT().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sorry for my ignorance here but I am a little confused about what you are doing. Do you mind claying exactly what you are doing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Not sure understand correctly.
In this discussion we will collect, I hope, all the issues related to the design of user libraries based on .Net languages.
Feel free to asking questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sorry I should have read up on EFI before posting. Is this a way of developing user defined functions with Mathcad I take it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes it is.
Here one man asked to help him: Re: DLL in Visual Studio
What I want to do is in the opposite direction: I want to know if it is possible to call a function, previously builded in Visual Studio, from Mathcad and then be able to manipulate the
data gathered from that visual Studio function in a mathcad worksheet.
Please, correct me if I misunderstood your post.
Diego.
I liked his example and I decided to help him. Now it is possible to implement the project in the way that he wants. I'll show later how to do it using vb.net.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Ok, now we can take a snapshot from usb webcam
Don't forget, this works only on 32-bit systems. I don't have access to a 64-bit system for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Very impressive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Updated (github).
Now you can use context:
public bool NumericEvaluation( object[] args, out object result, ref Context context ) {
//while ( !context.IsUserInterrupted ) { }
if ( context.IsDefined( "vbecho" ) ) {
context[ "vbecho" ].NumericEvaluation( args, out result, ref context );
} else {
result = Evaluate( ( string ) args[0] );
}
return true;
}
public string Evaluate( string text ) {
return text;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Updated (github).
How it works (rus): Внедрение кода с пользой
Tested for MC15 M050 x32 and MC Prime 6.0 x64. Now you can use .net (c#, vb.net, c++/cli) user functions in x64 Mathcad Prime.
[22-01-2021]
- 64-bit support added.
[21-01-2021]
- TComplex changed to .Net Complex from System.Numerics;
- refactored.
[19-01-2021]
- added support utf-8 for result string;
- added example project "capture".
[18-01-2021]
- only for 32-bit systems;
- mc15 m050 tested;
- .net 4.0 supported;
- examples for vs2019.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Now we can increase the speed of calculations. In this example in 5 times. Part of the function is implemented in the plugin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
MC Prime 7.0 x64 also supported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mathcad Prime 8.0 x64 also supported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mathcad Prime 10.0 x64 also supported.
