Mathcad Custom Functions

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

#21 Posted: 3/29/2012 8:48:20 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello uni,
Wrote

This function from Mathematical library for MathCad v1.2 (Giuseppe Borzì ) which is in the userefi/mathlib.dll file. You can delete mathlib.dll and function round() will disappear without plug-in switch-off. The example with function is given in the Mathlib.pdf (page 3).


Unfortunately, there will dissapear all the mentioned functions and not only round().

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#22 Posted: 3/29/2012 9:43:01 AM
kmihaylovich

kmihaylovich

8 likes in 131 posts.

Group: User

uni, welcome back! Is it possible to add support for the units in your library? It will be really great! Very desirable feature! Unfortunately most of the functions returns error instead of the result
#23 Posted: 3/29/2012 9:51:53 AM
kmihaylovich

kmihaylovich

8 likes in 131 posts.

Group: User

uni, I'm talking about errors when trying to use the dll from http://www.wsp.ru/ru/download.asp with your plugin... Please, could you support it? I've checked the code, but don't know how to fix it - the error appears in the file https://smath.info/svn/public/plugins/mcadefi/mcaduser/EFIManager.cpp in the line "throw gcnew Exception( "Error in mathcad efi function: "". If you have no time for this, could you please advise how to fix it? Please! Your plugin is great!
#24 Posted: 3/29/2012 10:03:25 AM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

Unfortunately no. Mathcad EFI never supported units. I made a maximum that is possible. I do not recommend to use this interface since it became outdated. As far as I know in new versions of Mathcad PTC forgot about it. There can be you mean something another.

Yes, I tried WaterSteamPro, there are too much functions. I had no license to work with them closely. Functions loaded, but no more than that.
Russia ☭ forever, Viacheslav N. Mezentsev
#25 Posted: 3/29/2012 10:04:15 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote

...Your plugin is great!


I agree. Uni made some great plugins - I mentioned that few times. They need some polishing, I think, and I hope it will happen ASAP.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#26 Posted: 3/29/2012 10:11:14 AM
kmihaylovich

kmihaylovich

8 likes in 131 posts.

Group: User

uni, do you mean that functions with no description - it is because of the no license installed?

You said that Mathcad EFI never supported units, but how Mathcad works with these functions using WaterSteamPro? Does it use another interface?
#27 Posted: 3/29/2012 10:34:44 AM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

Quote

uni, do you mean that functions with no description - it is because of the no license installed?

No, it was long ago, as I remember in case of function invocation there was a window with the message that there is no license. And the description on the picture is created by a plugin automatically. If we want to make a complete description is required an additional information which isn't available in wspmcad.dll (about units I mean).

Quote

You said that Mathcad EFI never supported units, but how Mathcad works with these functions using WaterSteamPro? Does it use another interface?

Yes, it read additional XML files with the description of functions (but I'm not sure, since didn't work with units). If you look at the function description in the MCADINCL.H file, will see that there is nothing about units.

Quote

I've checked the code, but don't know how to fix it - the error appears in the file https://smath.info/svn/p...mcaduser/EFIManager.cpp in the line "throw gcnew Exception( "Error in mathcad efi function: ""

If execution of the program reached this line, it means that function returned an error. The plugin tries to show an error in that look in which it is described in the library. There is one uncertainty which I didn't complete. A problem with the table of error messages. In one libraries of an error begin with a zero, in others from one. I didn't understand why such confusion, but it can cause the situation specified by you.
In any case function returned an error and the reason can be in other.
Russia ☭ forever, Viacheslav N. Mezentsev
#28 Posted: 3/29/2012 10:53:20 AM
kmihaylovich

kmihaylovich

8 likes in 131 posts.

Group: User

Thank you, uni!
#29 Posted: 3/30/2012 9:00:56 PM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

Quote

You said that Mathcad EFI never supported units, but how Mathcad works with these functions using WaterSteamPro? Does it use another interface?


I looked at library once again. In order that functions worked with units it is necessary to include the special file (watersteampro.mcd) in which each function from library is redefined for work with units. There is no additional interface, just redefinition.

I used "Water Steam Pro 6.0.1.36" from rutracker. I think it works with plugin .



Some docs (sm, pdf, rus): WaterSteamPro6.zip (mirror)
(my ftp works from time to time)
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
Andrey Ivashov 3/31/2012 12:47:00 AM, kmihaylovich 4/2/2012 1:25:00 PM
#30 Posted: 4/2/2012 1:26:45 PM
kmihaylovich

kmihaylovich

8 likes in 131 posts.

Group: User

Thank you! I will use it.
#31 Posted: 4/11/2012 5:57:19 AM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

Wrote

Hello,

I've noted that Mathcad EFI plugin has its own round(1) function. SMath has round(2). In spite of that the both functions have the same name but different numbers of arguments, when the EFI plugin is active then we can not use round(2). Here is a simple example:

EFI plufin enabled:
[MATH=eng]c←80/9[/MATH]
[MATH=eng]c=8.8889[/MATH]
[MATH=eng]round(c)=9[/MATH]
[MATH=eng]round(c,3)=9[/MATH]

EFI plugin disabled:
[MATH=eng]round(c,3)=8.889[/MATH]

Regards,
Radovan


I'd made some changes: mcadefi_20120411.zip (mirror)
Russia ☭ forever, Viacheslav N. Mezentsev
3 users liked this post
Radovan Omorjan 4/11/2012 6:06:00 AM, kmihaylovich 4/11/2012 6:06:00 AM, Andrey Ivashov 4/11/2012 11:53:00 AM
#32 Posted: 5/3/2013 7:20:27 AM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

Updated. Small fixes, but doesn't work in SMathStudio 0.96.4868 (Andrey will fix this in the next build).
Russia ☭ forever, Viacheslav N. Mezentsev
#33 Posted: 5/3/2013 11:27:54 AM
kilele

kilele

133 likes in 397 posts.

Group: User

Great! I overlooked what this plugin was about. It seems to be like the plugin requested in
Built-in Thermodynamic (and other) Tables - Internal function to return thermodynamic properties
I've just updated one of my posts on that thread with c# libraries :
http://en.smath.info/forum/yaf_postsm9354_Built-in-Thermodynamic--and-other--Tables.aspx#post9354
#34 Posted: 6/11/2013 12:07:37 PM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

Updated.
Russia ☭ forever, Viacheslav N. Mezentsev
#35 Posted: 6/17/2013 6:14:42 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I have problems installing EFI. Did install the mathlib.dll from userefi.zip in post #1

Details in the attached sheet...
Plugin EFI for SMath Studio.sm (45 KiB) downloaded 94 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
ioan92 6/18/2013 12:19:00 AM, Вячеслав Мезенцев 6/18/2013 7:13:00 AM
#36 Posted: 6/18/2013 8:56:31 AM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

Wrote

I have problems installing EFI. Did install the mathlib.dll from userefi.zip in post #1

Details in the attached sheet...



Try to update and show me the log file (userefi\efi.txt).

Russia ☭ forever, Viacheslav N. Mezentsev
#37 Posted: 6/18/2013 5:41:15 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote


Try to update and show me the log file (userefi\efi.txt).



Different behaviour now. Installs cleanly, but then math regions cannot be edited any more (or more precise: just character by character intermixed with error messages.)

But, sorry, I did not find a file efi.txt in the plugin directory. Details again in the attachment.
Plugin EFI for SMath Studio.sm (23 KiB) downloaded 84 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#38 Posted: 6/18/2013 6:13:14 PM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

This means that plugin can't load mcaduser.dll library. I don't know why.

Quote

But, sorry, I did not find a file efi.txt in the plugin directory.


Updated. Try again with new version. This file is deleted when you close the program.
Russia ☭ forever, Viacheslav N. Mezentsev
#39 Posted: 6/18/2013 6:40:33 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Better now, no more crashes, but no function as well.

Installs cleanly. Edit of math regions without problems now, after manually adding mathlib.dll to userefi (still required?) I see the file efi.txt. Contents: (says: not a valid Win32 application. Exception of HRESULT...

19.06.2013 00:32:26 [Error] ist keine zulässige Win32-Anwendung. (Ausnahme von HRESULT: 0x800700C1)
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#40 Posted: 6/18/2013 7:19:42 PM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

I think the problem is that you are using a 64-bit system. This is an old problem and I don't know how to solve it. Also, I don't know if this is possible at all (load 32-bit libraries on 64-bit system).

EDIT: Lesson 2. Support of 32-bit applications in the 64-bit Windows environment. Why cannot 32-bit DLL's be used in a 64-bit program?
Quote

It is impossible to load a 32-bit DLL from a 64-bit process and execute its code. It is impossible due to the design of 64-bit systems. It is impossible fundamentally. And no tricks and undocumented means will help you. To do this you will have to load and initialize WoW64, not to speak of the kernel structures. Actually, it means that a 64-bit process must be made 32-bit "on the fly".



There is no easy way. You can't use user libraries that have been created for 32-bit systems.
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Davide Carpi 6/19/2013 12:36:00 AM
  • New Posts New Posts
  • No New Posts No New Posts