Page 1 of 1

Getting started with external functions

Posted: Sun Mar 02, 2025 6:12 pm
by hazhir
All,
I am trying to figure out how to build external functions to work with Vensim. Not being a programmer I rely on AI (claude or chatgpt) to get the project together, but I have not been able to succeed so far. Are the examples of external functions shipped with Vensim up-to-date and usable with visual studio 2022 for example to learn how to build those? trying to build a project with the files "vensim_external_functions.c" and "vensim_external_functions.def" gave many errors in Visual Studio, and working with AI to build a project from scratch also it various walls. What would be your recommended path to figure this out for a programming novice?
Thanks,
hazhir

Re: Getting started with external functions

Posted: Sun Mar 02, 2025 6:35 pm
by Administrator
Vensim comes with a visual studio project. I'm on a Mac at the moment, but the path is similar in Windows.

/Users/Public/Vensim/comp/VensimExternalFunctionLib/Windows/VensimExternalFunctionLibrary.sln

That should build and run in the latest Vensim. And from there, it should be straightforward to copy an existing function to something new.