Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello dear friends,
Even though I have copied CoolPropMathcadWrapper.dll file to C:\Program Files\PTC\Mathcad Prime 3.1\Custom Functions, I still cannot reach any functions of the dll.
I searched on the Internet but I couldn't find anyone who faced the same problem.
I would be really appreciated if anyone could help me.
Solved! Go to Solution.
I have solved my problem and want to let you all know.
I rebooted my computer and then I installed Mathcad Prime v.6.0.0.0 again on it. Everything is working flawlessly right now. I think the reason why I had the error is changing the language of my OS.
Normally I was using the English version of Windows and then I changed the language to German. I had a similar problem with the "ADAMS" programme, provided by MSC, also and at the moment it is working well, too.
Well, you're in luck. I wrote that add-in wrapper for CoolProp and just happened to be on the forum today. For future reference CoolProp issues are posted on GitHub and there is a CoolProp Google Group for general usage questions. However, I can try to help you here.
CoolProp Version 6.4.0 is working here on Mathcad Prime 6.0.0.0 on my Windows 10 machine:
Which version of CoolProp did you download from SourceForge?
Which version of Windows are you running?
A few (really) obvious things I have to ask:
Let me know.
Jeff
Hi Jeff,
You believe rightly. The .dll doesn't work in Express, custom functions is a Premium feature.
If it weren't I would have written all those functions as a .dll, instead of implementing them in Prime.
Luc
Hi Jeff,
First of all, thank you for responding to my question.
I am using Windows 10 Professional and Mathcad Prime v.6.0.0.0 on my device and I tried several versions of CoolProp, including 6.4.0 and 6.4.1.
I also followed all the things you want me to check as I am told on the PTC website. Still, it's not working.
And as I know, I am not the only one who faces the same problem in my class.
First let me stat that I have no experience with CoolProp whatsoever.
But I noticed that you wrote that you copied the dll to the directory
C:\Program Files\PTC\Mathcad Prime 3.1\Custom Functions
but later you wrote that you are using Prime 6.
So I wonder if the correct path to copy the file might not be more likely
C:\Program Files\PTC\Mathcad Prime 6.0.0.0\Custom Functions.
Hi,
You are right.
Since I am using my pc in German, I have just copied an then pasted the folder directory from the website which gives user information to use dll. When I pasted the text here, I did not realize that.
However my version is 6.0.0.0 and I have directed the file correctly. You can consider that "3.1"in my question above as a" typo".
Thank you for letting me know.
Nun, ich hatte es schon befürchtet, dass die Lösung nicht so einfach sein würde, aber einen Versuch war es Wert.
Ich hoffe dass Jeff als (Mit)Autor der Erweiterung dir hier oder in einem der anderen Foren, die er genannt hatte, weiter helfen kann.
🙂 hab's begriffen. Jedenfalls herzlichen Dank!
This might be a language/locale issue, either the Windows language, or the Prime language, or both...
Success!
Luc
Hi,
I have changed the language of my operator and then tried afterwards. Still, nothing differs 😞
I think @LucMeekes may be right.
I see from your screen capture that your DLL location is:
Just for grins, can you create the following path on the machine (you might not have C: drive access) and copy the DLL file in there:
There's nothing in my CoolProp code that relies on this path, but maybe, just maybe, PTC is not finding the DLL to pick up because your "Program Files" directory is called "Programme". Mathcad looks specifically for that directory and loads any DLLs it finds there. This would be a reportable PTC bug if it works. Give it a try and let me know.
Has anyone else successfully loaded a DLL (even the simple examples they provide) on a localized version of Windows with a non-English "Program Files" directory?
"Programme" just is an alias, a softlink to the directory whose actual name in the file system is "Program Files" also in foreign language versions. So I don't think that this should be a problem. But if it is, I, too, would call it a severe bug in Prime.
It is unlikely to create such a file in C. Because even if "Programme" and "Program Files" differ each other due to their syntax, they are the same folders. If I want to create it there, my pc gives me a duplication error 😞
I will try that Visual Studio recommendation of yours, I let you know about it.
Thank you so much for your effort.
Any progress on this? I'm really curious why the code isn't loading properly on that side of the pond.
Thanks,
Jeff
Sounds like you may be at a University. Find someone with Visual Studio and compile the simple PTC examples in the Custom Functions directory (this will take some perseverance the first time) and see if Mathcad picks those up. If it does, it may be that CoolProp needs to be re-compiled on the localized version of Windows. I have no idea why, but that may be the case.
Jeff
I have solved my problem and want to let you all know.
I rebooted my computer and then I installed Mathcad Prime v.6.0.0.0 again on it. Everything is working flawlessly right now. I think the reason why I had the error is changing the language of my OS.
Normally I was using the English version of Windows and then I changed the language to German. I had a similar problem with the "ADAMS" programme, provided by MSC, also and at the moment it is working well, too.