NCalc scripting doc...
 
Notifications
Clear all

NCalc scripting documentation?

6 Posts
5 Users
0 Likes
6,044 Views
(@mark-l)
Active Member
Joined: 4 years ago
Posts: 7
Topic starter  

Is there any good reference source for this anywhere? I've spent (wasted?) weeks wading through the scripts in existing dashes and overlays trying to make sense of it all and using trial and error to get anywhere. The documentation is very sparse, doesn't cover everything, and doesn't explain the examples that well either. Is it deliberately made this way to frustrate everyone? Surely a good complete document must exist somewhere instead of relying on snippets spread all over the place?

 

Cheers.


   
Quote
(@admin5435)
Prominent Member Admin
Joined: 7 years ago
Posts: 728
 

Hi !

Ncalc is a basic computation engine the complete documentation of the engine is available here : https://github.com/sheetsync/NCalc/wiki . The simhub documentation is short because it was originally intended for basic use (divide by 100, change unit, concatenate texts , simple if/else...) Lot of people have been pushing it really hard, but it's not the use I had planned originally 😀 and it makes indeed barely understandable formulas (even for me), if you are digging in such kind of formulas it's probably why it's really hurting. ncalc is basically really close to excel formulas, and for more complex stuffs ideally it's better to use the plugin sdk to generate complex data (to continue on the excel analogy, ncalc is like excel formulas, plugin sdk is like VBA macros)

Considering the heavy flexibility given by ncalc I admit I had a hard time to find relevant examples, that's why I relied mostly on out of the box dashs to demonstrate "real life" examples, instead of theoretical examples.

Obviously I'm open and if you see some relevant examples/orientations for the documentation I would be happy to add it. (simple computations obviously, as I said ncalc can be tortured for complex computations but that's not the goal, and I don't want to demonstrate that)

What are you trying to compute exactly ?

Nicolas


   
ReplyQuote
(@mark-l)
Active Member
Joined: 4 years ago
Posts: 7
Topic starter  

Thanks for the explanation, it makes a bit sense now why it's not well documented. I was mainly trying to understand some of the syntax and functions of it in general. Headache stuff at times 😀.


   
ReplyQuote
(@rhudriver)
New Member
Joined: 4 years ago
Posts: 1
 

It was tricky, but with my basic understanding of programming and the reference material here I was able to roughly start figuring out how to make some of the basic customizations in dash studio.

 

The question I have, is there some kind of reference cheat sheet out there that shows what the iRacing "values" equate to?  Again, basic understanding so my terminology is going to be pathetic, but I was reverse engineering some dashes and searching on the internet to try and interpret some information and I stumbled on simracingapp data that showed me for "xxxCarLeftRight" LRClear=1, LRCarLeft=2, LR2CarsLeft=5, etc.  Is there a master document out there that tells you want all these expressions are for all the different field values (carleftright, enginewarnings, etc.)?


   
ReplyQuote
(@amelie687)
New Member
Joined: 6 months ago
Posts: 1
 

@bloxorz

Dash and Overlay Scripting Examples. You know, this GitHub repository contains a collection of dash and overlay scripting examples. These examples can be helpful for learning about different features and techniques, but they are not always well-documented and they may not work perfectly with your own project.

This post was modified 6 months ago by amelie687

   
ReplyQuote
(@sohenro)
New Member
Joined: 7 months ago
Posts: 2
 

@fnaf security breach

The official documentation of the platform or program that you're using should be your first stop. whether it's an open-source project, you should look to see whether there's a repository or official website containing documentation for it. Although the documentation may not always be exhaustive, it is often a reliable place to begin looking for answers.


   
ReplyQuote
Share: