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: 

iLogic rule msgbox/log live feed

6 REPLIES 6
Reply
Message 1 of 7
JoãoASilva
574 Views, 6 Replies

iLogic rule msgbox/log live feed

Hello everyone!

 

I have a complex rule that fires a lot of external rules when the multisheet drawing is done.

At the end, a message box is shown saying the rule as finished as well as the elapsed time.

 

Sometimes a few errors may occur during an external rule, but the Master Rule will continue the rest.

I would like to get a "live feed" of whats going on.

 

Example:

JoãoASilva_0-1605623773500.pngJoãoASilva_1-1605623794346.pngJoãoASilva_2-1605623807100.png

 

Is it even possible to have a live feed like this, running alongside the rule?

João Silva

Mechanical Engineer

 

If what I said solved your problem, or answered your question, please use the ACCEPT AS SOLUTION or KUDOS buttons.

Or if it helped you, please hit "LIKE" 

 

Inventor Professional 2023.3, Build 359

6 REPLIES 6
Message 2 of 7
DRoam
in reply to: JoãoASilva

What version of Inventor do you have? If you have Inventor 2019 or newer you can use the new iLogic "Logger" that's built specifically for this purpose. See here for usage instructions: Inventor 2019 Help: To Create Log Statements.

Message 3 of 7
JoãoASilva
in reply to: DRoam

I have Inventor always up to date (2021).

 

I'll give it a go and i'll either post here the result, or ask for more help.

Thanks!

João Silva

Mechanical Engineer

 

If what I said solved your problem, or answered your question, please use the ACCEPT AS SOLUTION or KUDOS buttons.

Or if it helped you, please hit "LIKE" 

 

Inventor Professional 2023.3, Build 359

Message 4 of 7
JoãoASilva
in reply to: DRoam

I'm having trouble using the new "logger" function.

I can't seem to log anything. I've set the logging to info, enabled iLogic Log and even placed the "Logger.log level("message")" (wich gives an error).

 

From what I understand, this log will not be a pop up window like a message box. And if I don't have 'iLogic Log' enabled, I won't even see anything.

 

I'm implementing this at work, and we have a few people that don't know to work with this kind of stuff.

It would be a lot easier if it could be a msgbox.

 

Is it possible?

João Silva

Mechanical Engineer

 

If what I said solved your problem, or answered your question, please use the ACCEPT AS SOLUTION or KUDOS buttons.

Or if it helped you, please hit "LIKE" 

 

Inventor Professional 2023.3, Build 359

Message 5 of 7

Hi @JoãoASilva 

 

By the very nature of a message box, it will pause the executing code to await a user input, so essentially no you cannot use this method to have a live feed unless you want your users to continually click 'OK'. 

 

Use 'Logger.Debug("My message")' to feedback your progress. Launch the iLogic log window in your main rule like this:

 

oInternalName = "ilogic.logwindow"
For Each oDockableWindow As Inventor.DockableWindow In ThisApplication.UserInterfaceManager.DockableWindows
	If oDockableWindow.InternalName = oInternalName Then
		If Not oDockableWindow.Visible = True Then
			oDockableWindow.Visible = True
		End If
	End If
Next

I found this from another post by @DRoam, here: Open iLogic Browser 

Message 6 of 7
Eide.N
in reply to: lmc.engineering
Message 7 of 7

Hi @lmc.engineering !

 

Thanks for the code!

I even placed an altered version at the end to close the iLogic Log window.

That works well, but I need to clean the previous run from the logger.

Do you know how to do it?

 

@Eide.N 

A progression bar is cool, but it would be a pain to figure out the number os steps so that it doesn't go past 100%.

This because I have multiple rules that run depending on the type of file and our internal coding.

 

@DRoam 

It's a shame that we don't have that much information regarding the logger on that link...

João Silva

Mechanical Engineer

 

If what I said solved your problem, or answered your question, please use the ACCEPT AS SOLUTION or KUDOS buttons.

Or if it helped you, please hit "LIKE" 

 

Inventor Professional 2023.3, Build 359

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report