iLogic - Tutorial materials

iLogic - Tutorial materials

bespel
Advocate Advocate
408 Views
1 Reply
Message 1 of 2

iLogic - Tutorial materials

bespel
Advocate
Advocate

Hi,

 

I have read document about iLogic.

Official and not official.

But they have alway a didactic approach : if, then end if.

 

When I read rules i read oftern : "Dim...   Sub..  "

Where can i learn this kind of rules? (I would like a simplified approach, not as a programmer, please don't suggest me to read bible manual about vb).

 

Thanks

0 Likes
409 Views
1 Reply
Reply (1)
Message 2 of 2

clutsa
Collaborator
Collaborator
'this is a comment because it comes after the single quote mark
'Dim declairs a variable, think of a variable as a container that holds data

Dim myVar1 = "this will be stored"
MessageBox.Show(myVar1, "Title") 'this line tells iLogic to show a messageBox that displays myVar1's contents

Dim myVar2 As String = "This will also be stored" 'string is programming language for text (not a number)
Messagebox.Show(myVar2, "Title")

Dim myVar3 As Double = 42 'double is one of many ways to store a number (the type of number you need depends on the math you will do with it)
Messagebox.Show(myVar3, "Title")

Dim myVar4 As Double = "42" 'this is wrong but iLogic is clever and will actually fix this 
Messagebox.Show(myVar4, "Title")

Dim myVar5 As Double = "This will throw an error" 'this is a string being held in a 'number variable' and will not work
Messagebox.Show(myVar5, "Title")

'In practice it's bet to use the Dim Var As Type method because if the variable knows what it is supposed to do it has more methods( programming for sub-abilities)
'the methods is where you see the myVar.method in other programs.
'if you comment out the line that is erroring above you can see this sample.
Dim doc = ThisDoc.Document
MessageBox.Show(doc.FullFileName, "Title")

'Subs don't get used often in iLogic but do get used a lot in VBA and VB.Net. (iLogic's old and more complicated siblings)
'Subs break code into small pieces that can be reused. In iLogic the "rule" itself is really the sub or that's how I treat it.

copy the above and paste it in a new iLogic rule to see how it works.

Unfortunately I don't know of a quick way to learn to program and that is what iLogic is, a simplified programming language. I learned what I know from VBA in Excel. There is more material on the web to get you started learning that from the ground up then with iLogic and once you get the idea it transfers really well so maybe start there.

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates