custom function fc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
custom function fc
33
11
11
22
Greetings, I tried to create custom functions in mathcad and it asks to do so, however when I tried to create the function fc and fc1 I found an error message
----------------------------------------------
Translated the text from Spanish to English using google translate
Body - Saludos intente crar funciones personalizadas en mathcad y pude hacerlo, sin embargo cuando intente crear la funcion fc y fc1 encontre un mensaje de error
--By Community Moderation Team
----------------------------------------------
Solved! Go to Solution.
- Labels:
-
Mathcad Usage
-
Other
- Tags:
- mathcad
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
There's just one problem here, the indices on the return vector/matrix are switched. Per the Mathcad Prime documentation for LRESULT:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @DM_10631844,
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Regards,
Vivek N
Community Moderation Team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
There's just one problem here, the indices on the return vector/matrix are switched. Per the Mathcad Prime documentation for LRESULT:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@DM_10631844 - Please accept the above as the answer if appropriate.
I've attached my version of your code basing it on the standard template provided by PTC. I had to change the extension from ".C" to ".txt" to post it here. you'll need to change it back to use it. It gives the following result in Mathcad Prime:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It only works for visual studio command promp so it has worked for you?
Could you tell me how it would be like this please? @terryhendicott @JeffH1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In Visual Studio IDE:
- Make sure you are compiling to "Release" and "x64" (in the main menu). Mathcad is 64-bit and needs a 64-bit DLL. Mathcad also won't know what to do with the Debug information in the DLL, so make it "Release".
In the VS Project Options:
- Set General compile type to DLL (not EXE)
- Add C++ path location to find the MCADINCL.H file in the Custom Functions folder
- Add Linker path location to find the mcaduser.lib file in the Custom Functions folder
- Set the DLL Entry Point under Linker Advanced
I think that should do it. Output DLL will be in the x64 folder of the VS project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you, perfect, first I review it and I assume your answer is valid, thank you very much, greetings
