New in CostPerform version 9.3.2: User Defined Functions (UDF)

New in CostPerform version 9.3.2: User Defined Functions (UDF)

CostPerform 9.3.2 comes with a lot of improvements, as you’ve probably read in our release blog. One of many is the UDF (User Defined Functions), making it easier to work with scripts and our Application Programming Interface (API).

For those of you who don’t know, an API is a library of functions that you can use to create a script, which is a program that executes an algorithm or a series of algorithms. So, with the API, you can – for example – write a script that opens every period in your cost database and checks if the outgoing costs on your first layer are equal to the incoming costs on your last layer. This can be done manually, but a script can do this job flawlessly and much faster, saving you time, and more importantly, help reduce errors.

CostPerform User Defined Functions 1

In short, making scripts with the CostPerform API is great for automating work and allows for expansion if you want more than the standard functions that are part of CostPerform. Do realize that API scripting takes a while to learn. You must have some programming experience with VB or better, Java script, and you must understand the CostPerform API library.

UDF benefits
As said before, CostPerform 9.3.2 comes with a lot of improvements. UDF, or User Defined Functions, is one of many, and with it, we’ve tried to improve the usage of scripts and API. So, thanks to UDF…

  • You can now store your own scripts in the CostPerform database;
  • You can now name your scripts and make them accessible (or inaccessible) for certain users;
  • You can now call on the UDF anytime, anywhere in CostPerform, via the right-click menu.

To learn more about what UDF brings, take a look at this example. In the new version of CostPerform, the API now has a command called ‘displayObject”. In the two lines of code shown in the screenshot below, you can see that this UDF has been made to open the navigator view for the current object in the current model. This means that wherever you call on this UDF, it will always open the navigator view for the object that is current (i.e. selected by the user). This UDF comes in handy if you want to see the navigator if a parent object is active, where normally the list view would show up.

CostPerform User Defined Functions

No more waiting
The screenshot below shows the right-click menu, where you can select ‘Show navigator’ via the menu item ‘User Defined Functions’. As a result, the navigator for cc04 shows, as visible in the second screenshot. And, since the API can also display bookmarks, allocations, and more, you can imagine that having these simple scripts stored as UDFs can really help you realize your demands for specific functions, without having to wait for a new release.

CostPerform User Defined Functions 3

Please let us know if you want to learn more about scripting, API, and UDF. Once you’ve experienced the extra dimension they can add to your CostPerform experience, you’ll never want to live without them anymore.

TBM whitepaper

Download the whitepaper to learn everything about our TBM software

Contains more information, TBM pricing, and a client case.