Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detailed iLogic Log

3 REPLIES 3
Reply
Message 1 of 4
brad.jackson
199 Views, 3 Replies

Detailed iLogic Log

Is there a way to get a detailed log of the code run in iLogic?  I am looking for something that actually shows what happens as it steps through each line of code.  This would be really helpful in finding my mistakes or oddities as the values change.

3 REPLIES 3
Message 2 of 4
WCrihfield
in reply to: brad.jackson

Hi @brad.jackson.  That does sound like it would be a pretty handy tool to have, but unfortunately I believe the closest thing we currently have to a tool like that is the built-in iLogic Logger tool.  It has several levels you can set it to, but for the most part, it is not going to record nearly as much detail as you seem to want on its own, at any one of those levels.  The most detailed level you can set it to is called 'Trace', and there is a checkbox for setting that to a 'Detailed Trace', but mostly that is just going to tell you what rules are starting, and when, then what rules are ending and when.  Of course there is more to it than that, but for the most part, you will want to include your own lines of code within your rules that will tell the Logger what specific information to include in the log.  Most folks only care to see something logged when something doesn't go according to plan, or when an error occurs, because anything else would likely lead to too much time spent reading through far too much long scrolling boring data that is often extremely repetitive.  You can also save the contents of the iLogic Logger out to a file if you want.  There is also a 'RuleExceptionsLog' but it doesn't sound very useful, because it says it is usually empty, due to it usually interactively prompting the user when those kinds of 'Exceptions' happen, plus it would only contain 'Exception' related data, not all the other regular stuff that happens.  I believe there is also a tool called the EventWatcher, but it somewhat advanced, only reacts to certain specific 'Events', and I believe it is in with Inventor's SDK stuff, which is generally geared towards developers.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 4
brad.jackson
in reply to: WCrihfield

Would there be a way to use Visual Studio to capture the rules as they run for more info?

Message 4 of 4
JelteDeJong
in reply to: brad.jackson

You have 2 options.

It's possible to use Visual Studio to step through your iLogic rule when you run it.  Have a look at this blog post:

https://modthemachine.typepad.com/my_weblog/2019/12/using-visual-studio-to-debug-ilogic-rules.html

My experience with this method is not so great but it does work.

 

The other option is to write your rules in Visual Studio. (This is my privileged method.) Then when you are ready you can just copy the code into the iLogic editor. This has also some disadvantages. More info on my blog:

http://www.hjalte.nl/47-writing-and-debugging-ilogic-rules

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report