After VBA code is run, Panels don't update correctly.

After VBA code is run, Panels don't update correctly.

shastu
Advisor Advisor
201 Views
1 Reply
Message 1 of 2

After VBA code is run, Panels don't update correctly.

shastu
Advisor
Advisor

Not sure how to even explain this but I will do my best and then post a screenshot.  I am running some code with the ScreenUpdating = False and the code can exit several places so I have made sure to set it back to true in all of those places.  When the screen updates, it is on a sitting on a drawing that was created.  Once the code is done and the screen updates to that drawing, everything looks great.  However, as I continue manipulating the drawing all of a sudden I look up and some of the Panels from other environments are showing but aren't "really there".  For example, if I try to click on them, nothing happens until I click on the actual panel.  See attached.  The Electromechanical shouldn't even be part of the drawing environment.  The Sketch panel on the right is a fake and does nothing, but if I click on the left one, it jumps to the Sketch panel as it should and everything looks correct again.  Anyone else experience anything like this?

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

dalton98
Collaborator
Collaborator

I had a similar issue when creating a rule that made a flat pattern for every sheet metal part in the assembly. The solution was to add new "Views" to the main document.

https://forums.autodesk.com/t5/inventor-forum/toolbar-switching-to-sheet-metal-part-when-ilogic-rule...

 

Maybe you could try messing with the user interface but when i tried that all the ribbon objects were read only

ThisApplication.UserInterfaceManager.Ribbons...... 

 

0 Likes