How to read Logger.Info?

How to read Logger.Info?

wowrs1608
Advocate Advocate
1,238 Views
4 Replies
Message 1 of 5

How to read Logger.Info?

wowrs1608
Advocate
Advocate

Hi,

 

New to iLogic. From here, http://www.hjalte.nl/60-creating-an-inventor-addin , I got this code:

 

For Each ribbon As Ribbon In ThisApplication.UserInterfaceManager.Ribbons
    Logger.Info(vbTab & Ribbon.InternalName)
    For Each ribbonTab As RibbonTab In Ribbon.RibbonTabs
        Logger.Info(vbTab & vbTab & RibbonTab.DisplayName & " - " & RibbonTab.InternalName)
        For Each ribbonPanel As RibbonPanel In RibbonTab.RibbonPanels
            Logger.Info(vbTab & vbTab & vbTab & RibbonPanel.DisplayName & " - " & RibbonPanel.InternalName)
        Next
    Next
Next

I opened an asssembly file. Under Manage/iLogic/Add Rule,I added it. And Save & Run. 

Where do I read the output? Thanks for help.

 

Cheers,

 

Pete

0 Likes
Accepted solutions (1)
1,239 Views
4 Replies
Replies (4)
Message 2 of 5

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @wowrs1608 

 

Click the + sign next to the Model browser, and then choose iLogic Log from the list.

 

 

Curtis_Waguespack_0-1655303002170.png

 

Or you can use something like this to toggle it on/of

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

 

Or something like this to turn it on

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

 I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 3 of 5

wowrs1608
Advocate
Advocate

Thank you very much. I can read the output now.

Message 4 of 5

JelteDeJong
Mentor
Mentor

I like the code that @Curtis_Waguespack proposed, and I have added it to the blog post. (However, with a small twist. It is possible to do it without a loop and if statement. I think it looks cleaner)

 

Regarding the question in your mail. I expect that your name for the ribbon panel is wrong. As far as I can see the name "Position.RibbonPanel" is not a default name. I expect that you need the name: "id_PanelA_AssemblePosition"

JelteDeJong_0-1655634184658.png

 

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

Message 5 of 5

wowrs1608
Advocate
Advocate

Yes, I have found that out. Assembly and Part looks like different products - Following different naming pattern.

Thanks your code, I have added a few buttons. 

0 Likes