Mathcad Custom Functions

Mathcad Custom Functions - This plugin will help you to connect Mathcad custom functions - Messages

#41 Posted: 6/19/2013 2:28:18 PM
kilele

kilele

133 likes in 397 posts.

Group: User

It could be possible to decompile those dlls to make the source code compatible with 64-bit systems
#42 Posted: 6/19/2013 3:07:22 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

This is not a good idea. It is much easier to use a virtual machine and run SMath Studio there. Fortunately, EFI is almost no one used. On the Internet it is difficult to find a library for Mathcad created by users. As for mathlib.dll, I have the source code. So I can rewrite the code in C# or C++/CLI.
Russia ☭ forever, Viacheslav N. Mezentsev
#43 Posted: 6/19/2013 3:22:31 PM
kilele

kilele

133 likes in 397 posts.

Group: User

ugh..you'd be scrubbing your hands like the famous surgeon trying to revive a monster

I think you mean to prepare some package to load within virtualbox or alike ?
#44 Posted: 6/19/2013 4:25:38 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Yes , but there is another solution: CorFlags Conversion Tool. Andrey advised me. You can use this utility to change SMathStudio_Desktop.exe (set the 32BIT flag). Maybe this will help. The new program will run as a 32​​-bit program.
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Davide Carpi 6/19/2013 5:17:00 PM
#45 Posted: 6/20/2013 5:54:47 AM
kilele

kilele

133 likes in 397 posts.

Group: User

Who knows if some of those plugins are made with .net, in that case some of these free tools might help:
http://www.jetbrains.com/decompiler/
http://msdn.microsoft.com/en-us/library/f7dy01k1(v=vs.80).aspx
http://filegenreflector.codeplex.com/
http://reflectoraddins.codeplex.com/
#46 Posted: 6/20/2013 9:10:37 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

EFI plugins can't be made with .net. This interface is designed to work only in unmanaged code (C, C++, Delphi, Fortran, assembler). For the 15 years of its existence nobody (almost) used it.
Russia ☭ forever, Viacheslav N. Mezentsev
#47 Posted: 6/21/2013 2:50:47 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote

Examples of user libraries using EFI:
1. C (С++): test
2. OPascal (Delphi7): NumericalRecipesPascal
3. Assembler (RadAsm): test2 (not finished)
4. Fortran 2003 (IVFC XE 12): TestFortran (not finished)



uni, could you explain please in few words, what does this actually mean? What is the connection between, say, Fortran 2003 (IVFC XE 12) and EFI plugin?

Cheers,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#48 Posted: 6/21/2013 5:08:03 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

This means that you can write a function in any of these languages. You can use the compilers of these languages ​​to create extensions for SMath Studio. Unmanaged code runs much faster. You can use the EFI interface as a wrapper for the old code. You can write an extension for SMath Studio directly on Fortran.
Russia ☭ forever, Viacheslav N. Mezentsev
#49 Posted: 6/21/2013 6:29:36 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote

This means that you can write a function in any of these languages. You can use the compilers of these languages ​​to create extensions for SMath Studio. Unmanaged code runs much faster. You can use the EFI interface as a wrapper for the old code. You can write an extension for SMath Studio directly on Fortran.


We mentioned such a possibility here and there on the Forum. I also nagged about this few times. If there could be a way to make some SMath packages
using any of older Fortran/C/C++ libraries, and use them within SMath...to be honest, it seems to me like a science fiction

I remember there was such a possibility in Mathcad long time ago. As I remember, the EFI thing was in case (USEREFI mechanism). As I remember, there were some preferred compilers at that time (Fortran/C/C++, than Fortran was abandoned). From my point of view (as an average user) it was a bit complicated. Therefore, I've never tried myself to make a user defined DLL in Mathcad. I just know that some Mathcad Handbook writers used this and expanded Mathcad with their own functions packaged into DLLs. I actually am not aware that anyone made any DLLs from some old and well established Fortran or C/C++ libraries (I might be wrong regarding this).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#50 Posted: 6/21/2013 6:52:46 AM
matthias

matthias

1 likes in 1 posts.

Group: User

Hello uni!

Thank for all of your nice plugins.

I like to give a hint for using the mcadefi plugin with windows 64.
I found an article about the dll issue:

http://blogs.technet.com/b/sbs/archive/2010/07/19/case-in-the-corner-series-x64-framework-not-working.aspx

I followed the instructions and now the efiplugin works fine with windows 7 ultimate 64

best regards
matthias
1 users liked this post
#51 Posted: 6/21/2013 7:04:13 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

I did it for myself. Such libraries are much faster than SMath Studio plugins. You can use the Fortran code, just rewriting it under the Fortran 2003 standard. Fortran is still used. I wrote a simple fortran library in Visual Studio 2010 (with IVFC XE 12). This dll works in Mathcad too.

In the Developer's Guide (in the Mathcad Help) is used a workaround to use Fortran libraries. They use a wrapper in C to call functions from Fortran library. I do this directly.
Russia ☭ forever, Viacheslav N. Mezentsev
#52 Posted: 6/21/2013 9:05:07 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote


I like to give a hint for using the mcadefi plugin with windows 64.
I found an article about the dll issue:

http://blogs.technet.com/b/sbs/archive/2010/07/19/case-in-the-corner-series-x64-framework-not-working.aspx

I followed the instructions and now the efiplugin works fine with windows 7 ultimate 64


This one does not work for me. Still in the efi.txt

6/21/2013 2:51:32 PM [Error] is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#53 Posted: 6/21/2013 9:19:53 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote

I did it for myself. Such libraries are much faster than SMath Studio plugins. You can use the Fortran code, just rewriting it under the Fortran 2003 standard. Fortran is still used. I wrote a simple fortran library in Visual Studio 2010 (with IVFC XE 12). This dll works in Mathcad too.

In the Developer's Guide (in the Mathcad Help) is used a workaround to use Fortran libraries. They use a wrapper in C to call functions from Fortran library. I do this directly.


You said that you wrote a simple fortran library which works both in SMath and Mathcad. That is very interesting. It seems very easy to accomplish this, when you explained this , but I think there is no chance to do that by myself. Do you plan, by any chance, to make a plugin by using some existing, free available, Fortran numerical library?

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#54 Posted: 6/21/2013 9:30:55 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

There are well-known IMSL® Numerical Libraries. Many people use this library, but it is commercial. This library exists in different versions (c# one of them). It can be used to extend SMath Studio.
IMSL Demo.PNG
Russia ☭ forever, Viacheslav N. Mezentsev
#55 Posted: 6/21/2013 9:46:11 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

I used it long time ago. I remember IMSL FORTAN routines on some VAX machine, more than 20 years ago. Than on some Fortran, MS Power Station 4.0 and Digital,Compaq Visual Fortran, some 10 years ago (sometiimes used NAG as well). I have'nt been using it for a while (10 years or so). Some of them are free. Many years ago I poked into Netlib free library (Fortran company). I switched to some more "light weight" software . When you said that it can be inside SMath, I believe you - but it seems to me like a "science fiction" .


Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#56 Posted: 6/21/2013 10:21:15 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

It's not so hard to use IMSL library now. Simple example (c#) - calculating special function (Imsl.Math.Sfun) Gamma(x):

Show Spoiler


The program requires some additional files: ImslCS.dll, LicenseFlexLM.dll and license.dat
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Radovan Omorjan 6/21/2013 10:30:00 AM
#57 Posted: 6/21/2013 10:29:04 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

Wrote


I like to give a hint for using the mcadefi plugin with windows 64.
I found an article about the dll issue:

http://blogs.technet.com/b/sbs/archive/2010/07/19/case-in-the-corner-series-x64-framework-not-working.aspx

I followed the instructions and now the efiplugin works fine with windows 7 ultimate 64


This one does not work for me. Still in the efi.txt

6/21/2013 2:51:32 PM [Error] is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

Regards,
Radovan



Try this assembly with the 32BIT flag.
SMathStudio_Desktop_0.96.4909_32bit.zip (195 KiB) downloaded 132 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
ioan92 6/26/2013 4:30:00 AM, Martin Kraska 6/22/2013 11:14:00 AM
#58 Posted: 6/21/2013 10:50:49 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Ha...it worked now . efi.txt is full of text now explaining what functions have been loaded

Thank you uni,

Regards,
Radovan

P.S. As I unpacked the entire archive OKAWSP6.dll error appeared. Explained here
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#59 Posted: 6/21/2013 12:05:29 PM
kilele

kilele

133 likes in 397 posts.

Group: User

Could it be possible to make a plugin to make plugins from within SMath or via python scripting ?
I made this suggestion last year:
http://en.smath.info/forum/yaf_postsm5715_ODE-solvers.aspx#post5715

Edit:

This opensource program has an embedded compiler, Johns Hope's FPlot
http://en.smath.info/forum/yaf_postsm9935_XYPlot-plugin.aspx#post9935
BTW, read the "Download" section on the original site, that approach could be of help for Andrey in order to make the new portable builds without including.NET2.0
#60 Posted: 6/22/2013 10:42:35 AM
kilele

kilele

133 likes in 397 posts.

Group: User

As for using Fortran in Smath, it seems to be possible by means of Python with the tool F2PY
http://wiki.scipy.org/F2py
http://www.ucs.cam.ac.uk/docs/course-notes/unix-courses/pythonfortran
https://github.com/thehackerwithin/PyTrieste/wiki/F2Py
  • New Posts New Posts
  • No New Posts No New Posts