The first refresh IDW ilogic script that works (fixes graphical display bugs)

The first refresh IDW ilogic script that works (fixes graphical display bugs)

maxim.teleguz
Advocate Advocate
371 Views
4 Replies
Message 1 of 5

The first refresh IDW ilogic script that works (fixes graphical display bugs)

maxim.teleguz
Advocate
Advocate

Because i am constantly trying to improve inventor sometimes i need to reinstall the software to get back to square one, but some work policies might not allow that. 

this is my ilogic script that i use to refresh any graphical issues in drawings.

'Definitions
Dim p As DrawingDocument = ThisApplication.ActiveDocument
Dim s As Sheet = p.ActiveSheet
Dim oDV As DrawingView
Dim oSketch As DrawingSketch
Dim oDC As DrawingCurve

'Loop through all views that currently exist on the active sheet
For Each oDV In s.DrawingViews
	
       'Create a new sketch on the active view
	oSketch = oDV.Sketches.Add
	
	'Put the sketch in edit mode
	oSketch.Edit
	
	'Exit the sketch
	oSketch.ExitEdit
	
	oSketch.Delete
Next
0 Likes
372 Views
4 Replies
Replies (4)
Message 2 of 5

maxim.teleguz
Advocate
Advocate

the way sketch creation and exiting out of sketch works restores the drawings graphical display really well. that means the autodesk did design a graphical refresh but never made it a feature but instead added to the ends of certain commands. 

This method of sketch creation and deletion work really well for being a refresh command. 

0 Likes
Message 3 of 5

WCrihfield
Mentor
Mentor

Hi @maxim.teleguz.  Just checking, but did you try Sheet.Update, executing the "AppRefineAppearanceCmd" command (CommandDefinition.Execute), or toggling the DrawingView.IsRasterView property's value (works similar to Right-Click Make View Raster & Make View Accurate), in your trial testing?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 5

maxim.teleguz
Advocate
Advocate
I tried Raster View but then that doesn't work as the borders would still have the graphical issues and only the view would be corrected.

I did try every possible update method there is known in the ilogic work and nothing was working.

I will test the AppRefineAppearanceCmd and let you know if that works.
0 Likes
Message 5 of 5

maxim.teleguz
Advocate
Advocate

AppRefineAppearanceCmd did not have any affect, however removing the last update did and i no longer have graphical issues. 2022.4.1 caused all the issues for me. 

0 Likes