To tie into the API help suggestion, here is a must read website. Alot of the concepts will be hard to digest and some will be for the advanced user such as add in and using visual studio for code writing but I would suggest start here and digest what you can.
https://modthemachine.typepad.com/my_weblog/2013/02/inventor-api-training-lesson-1.html
Be aware that ilogic is a short version of coding using VB.NET language so has it's limitations and differences than coding directly with VB.Net and the API. The API help samples is mostly written in VBA. You will see there is some slight differences but 80% of the code is the same.
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan