How to change external function

Use this forum to post Vensim related questions.
Post Reply
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

How to change external function

Post by RWTH_FCN »

Hi,
As you know, the address of external function in Vensim is in C:\Users\Public\Vensim\cfiles\venext.dll. But in this folder all files are in machine code. I want to change some part of my external functions but I cannot access their C format in this folder? Do you know which file has to be changed for updating external function?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: How to change external function

Post by Administrator »

Do you already have an external function library? If yes, you must have edited the C code in the past to create the DLL.

If not, the latest version of Vensim ships with a sample Microsoft Visual Studio workspace to create the DLL. You will find it in
C:\Users\Public\Vensim\COMP\VensimExternalFunctionLibrary
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: How to change external function

Post by RWTH_FCN »

Administrator wrote: Wed Feb 20, 2019 10:46 am Do you already have an external function library?

I have one 'venext.lib' in this folder( C:\Users\Public\Vensim\cfiles). My model already has its own external function and it works well. I just want to know how can I edit one of these external functions.

If yes, you must have edited the C code in the past to create the DLL.

Does it mean that I cannot edit it now?
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: How to change external function

Post by RWTH_FCN »

What I have to clarify is that, I want to edit one of user defined functions. The thing is that, I do not find its C cource in COMP path(C:\Users\Public\Vensim\COMP) or cfiles path(C:\Users\Public\Vensim\cfiles), although I just see its .obj foramt in cfiles path.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: How to change external function

Post by tomfid »

Users\public\vensim\cfiles isn't part of the Vensim distribution - could you have received that from whoever wrote the code for the external function?
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: How to change external function

Post by RWTH_FCN »

tomfid wrote: Wed Feb 20, 2019 2:35 pm Users\public\vensim\cfiles isn't part of the Vensim distribution - could you have received that from whoever wrote the code for the external function?
Yes, your are right. This folder has been added to Vensim folder and I want to edit its external fucntion which are all in '.obj' format. Can I add all those external function in venext.c file?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: How to change external function

Post by tomfid »

You'll need the .c source code for the functions you're using.
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: How to change external function

Post by RWTH_FCN »

tomfid wrote: Wed Feb 20, 2019 4:07 pm You'll need the .c source code for the functions you're using.
Thank you. I have them.
Post Reply