Is there a way to refresh all thumbnails?

Is there a way to refresh all thumbnails?

SharkDesign
Mentor Mentor
6,623 Views
17 Replies
Message 1 of 18

Is there a way to refresh all thumbnails?

SharkDesign
Mentor
Mentor

I love the new feature in the BOM that allows you to export the thumbnails too, but I use a gradient background to stop eyestrain from staring at white all day. This prints a bit crap and makes the thumbnail harder to see. 

If I change my background to pure white is there a way to update all the thumbnails in an assembly so they use the current background colour settings?

  Inventor Certified Professional
Accepted solutions (3)
6,624 Views
17 Replies
Replies (17)
Message 2 of 18

salariua
Mentor
Mentor

You can try All Thumbs from here

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 3 of 18

SharkDesign
Mentor
Mentor

That sounds interesting, where is the download link for it?

 

Thanks

James

  Inventor Certified Professional
0 Likes
Message 4 of 18

salariua
Mentor
Mentor

you need to send Thomas an email from the contact page here.

 

So let's just ask @Anonymous if this add-in works with existing files or for new files only?

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 5 of 18

johnsonshiue
Community Manager
Community Manager

Hi James,

 

For individual file save, you can click on Option button in Save dialog. There you can control how the thumbnail for the given file will be captured.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 6 of 18

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi jameswillo,

 

Here's an iLogic rule you can run from the assembly, that will toggle the background color from your current to white, save the thumbnail, and then toggle it back to your original color settings.

 

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

 

related link:

https://forums.autodesk.com/t5/inventor-forum/sketch-visibility-in-thumbnails/td-p/7149677

 

'get current color scheme name 
oColorScheme = ThisApplication.ActiveColorScheme.Name

'get current color scheme background type
oBackGroundType = ThisApplication.ColorSchemes.BackgroundType

'Change to Presentation (white background)
ThisApplication.ColorSchemes.Item("Presentation").Activate

'set to use one color background type
ThisApplication.ColorSchemes.BackgroundType = _
BackgroundTypeEnum.kOneColorBackgroundType 

Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
Dim oDoc As Document
Dim oRefFile As FileDescriptor

For Each oDoc In oAsmDoc.AllReferencedDocuments
	ThisApplication.Documents.Open(oDoc.Fullfilename, True)  
	
	For Each oSketch In oDoc.ComponentDefinition​.Sketches
		oSketch.Visible = False
	Next
	
	'set work plane visibility
	For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
	oWorkPlane.Visible = False
	Next
	
	'set work axis visibility
	For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
	oWorkAxis.Visible = False
	Next
	
	'set work point visibility
	For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
	oWorkPoint.Visible = False
	Next

	'set iproperty to use ISO view on save
	oDoc.SetThumbnailSaveOption _
	(ThumbnailSaveOptionEnum.kActiveComponentIsoViewOnSave)
	
	'save and close the file
	oDoc.Save
	oDoc.Close
Next

'Change back to original scheme
ThisApplication.ColorSchemes.Item(oColorScheme).Activate 

'Change back to original back ground type
ThisApplication.ColorSchemes.BackgroundType = oBackGroundType

EESignature

Message 7 of 18

SharkDesign
Mentor
Mentor

Well that was exciting!

 

It errors on library parts but not content center for some reason. Other than that it seemed to do the job.

 

Nice one!

  Inventor Certified Professional
Message 8 of 18

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@SharkDesign wrote:

 

It errors on library parts but not content center for some reason.


Hi jameswillo,

 

Here's a quick update that adds a Try/Catch on the Save call, so if the file can't be saved due to library or read only status, it catches the exception, and just moves to the next file.

 

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

 

'get current color scheme name 
oColorScheme = ThisApplication.ActiveColorScheme.Name

'get current color scheme background type
oBackGroundType = ThisApplication.ColorSchemes.BackgroundType

'Change to Presentation (white background)
ThisApplication.ColorSchemes.Item("Presentation").Activate

'set to use one color background type
ThisApplication.ColorSchemes.BackgroundType = _
BackgroundTypeEnum.kOneColorBackgroundType 

Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
Dim oDoc As Document
Dim oRefFile As FileDescriptor

For Each oDoc In oAsmDoc.AllReferencedDocuments
	ThisApplication.Documents.Open(oDoc.Fullfilename, True)  
	
	For Each oSketch In oDoc.ComponentDefinition​.Sketches
		oSketch.Visible = False
	Next
	
	'set work plane visibility
	For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
	oWorkPlane.Visible = False
	Next
	
	'set work axis visibility
	For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
	oWorkAxis.Visible = False
	Next
	
	'set work point visibility
	For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
	oWorkPoint.Visible = False
	Next

	'set iproperty to use ISO view on save
	oDoc.SetThumbnailSaveOption _
	(ThumbnailSaveOptionEnum.kActiveComponentIsoViewOnSave)
	
	'try to save 
	Try
	oDoc.Save
	Catch 
	'catch error and do nothing 
	End Try
	
	'close the file
	oDoc.Close
Next

'Change back to original scheme
ThisApplication.ColorSchemes.Item(oColorScheme).Activate 

'Change back to original back ground type
ThisApplication.ColorSchemes.BackgroundType = oBackGroundType

EESignature

Message 9 of 18

Anonymous
Not applicable

@salariua @SharkDesign Although it hasn't been updated in a few years and I'm not even sure it works anymore, you can download All Thumbs from here: https://drive.google.com/open?id=0B9vVYSYnP3lOWkFPWlQtVVh4Skk

 

It worked on new and existing files on every save. Browsing through a folder of parts where they all had different background colors for the thumbnail was way too much for my CAD OCD.

 

Let me know how it works for you if you use it. I'm considering updating it for the latest version of Inventor since I've gotten so much new interest in the app the last few months.

Message 10 of 18

SharkDesign
Mentor
Mentor

Thanks, but how do I use this once it's installed?

I can't find how to launch the dialogue. 

  Inventor Certified Professional
0 Likes
Message 11 of 18

Anonymous
Not applicable

@SharkDesign since this is an older add-in, Inventor will block the add-in from loading by default. You need to first install All Thumbs and then make sure it's not blocked in the add-in manager. Also, check the boxes mark it as loaded and load automatically.

 

When you have no documents open, there will be a button on the "add-ins" toolbar for "All Thumbs". Open this and check the box to enable the app after you select your preferred options.

 

I just tested the app and it actually still works perfectly with Inventor 2018.

Message 12 of 18

SharkDesign
Mentor
Mentor

Closing all the documents first was the bit I hadn't done.

 

Thanks!

  Inventor Certified Professional
0 Likes
Message 13 of 18

Anonymous
Not applicable

Yeah sorry, it's a bit wonky. I know. I would make it a little more user friendly if I were to update it.

0 Likes
Message 14 of 18

SharkDesign
Mentor
Mentor

It mostly works but quite often gets stuck on the white background and doesn't switch back. Resaving it usually fixes it. 

It also changes the background in drawings which is unnecessary, but I don't know how this is coded so you might not be bale to get away from that. 

 

Other than that, it's brilliant!

  Inventor Certified Professional
0 Likes
Message 15 of 18

Anonymous
Not applicable

Thanks Curtis!

 

It was incredibly helpfull!

Message 16 of 18

K.TRYFONIDIS
Advocate
Advocate

Thanks @Curtis_Waguespack for this it works awesome. I have a slight problem with some long beams though, profiles, that due to length i guess i get some straight lines, check picture bellow:

Is there a way to change the perspective or the view to show it like bellow?

long beam can't tell the geometry.

KTRYFONIDIS_0-1648716602331.png


Desired picture:

KTRYFONIDIS_1-1648716663185.png


Thanks a lot in advance.

 



Message 17 of 18

Curtis_Waguespack
Consultant
Consultant

Hi @K.TRYFONIDIS 

 

Here is a version that selects the XZ Plane, and looks at it before saving the part files. I know you asked for a perspective view, and this sets an end view, but this approach might work. If not we can likely set the camera view to an specific iso view instead of looking an origin plane. I'll try to post back an example of that later as well.

 

You might need to add some logic to help it know which parts to do this for, so that not all parts will have that view, but I think something like this example would be the way to go.

 

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

 

 

 

'get current color scheme name 
oColorScheme = ThisApplication.ActiveColorScheme.Name

'get current color scheme background type
oBackGroundType = ThisApplication.ColorSchemes.BackgroundType

'Change to Presentation (white background)
ThisApplication.ColorSchemes.Item("Presentation").Activate

'set to use one color background type
ThisApplication.ColorSchemes.BackgroundType = _
BackgroundTypeEnum.kOneColorBackgroundType

Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
Dim oDoc As Document
Dim oRefFile As FileDescriptor

For Each oDoc In oAsmDoc.AllReferencedDocuments
	ThisApplication.Documents.Open(oDoc.FullFileName, True)

	For Each oSketch In oDoc.ComponentDefinition​.Sketches
		oSketch.Visible = False
	Next

	'set work plane visibility
	For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
		oWorkPlane.Visible = False
	Next

	'set work axis visibility
	For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
		oWorkAxis.Visible = False
	Next

	'set work point visibility
	For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
		oWorkPoint.Visible = False
	Next

	Dim oDef As PartComponentDefinition
	oDef = oDoc.ComponentDefinition

	oDoc.SelectSet.Clear
	'select plane
	oDoc.SelectSet.Select(oDef.WorkPlanes.Item("XZ Plane"))

	Dim oCtrlDef As ControlDefinition
	oCtrlDef = ThisApplication.CommandManager.ControlDefinitions("AppLookAtCmd")
	
	ThisApplication.ActiveView.Fit

	
	oCtrlDef.Execute

	'set iproperty to use current view on save
	oDoc.SetThumbnailSaveOption _
	(ThumbnailSaveOptionEnum.kActiveWindowOnSave)

	'try to save 
	Try
		oDoc.Save
	Catch
		'catch error and do nothing 
	End Try

	'close the file
	oDoc.Close
Next

'Change back to original scheme
ThisApplication.ColorSchemes.Item(oColorScheme).Activate

'Change back to original back ground type
ThisApplication.ColorSchemes.BackgroundType = oBackGroundType

 

 

EESignature

Message 18 of 18

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Here is a version that sets the camera to use a bottom iso view.

 

'get current color scheme name 
oColorScheme = ThisApplication.ActiveColorScheme.Name

'get current color scheme background type
oBackGroundType = ThisApplication.ColorSchemes.BackgroundType

'Change to Presentation (white background)
ThisApplication.ColorSchemes.Item("Presentation").Activate

'set to use one color background type
ThisApplication.ColorSchemes.BackgroundType = _
BackgroundTypeEnum.kOneColorBackgroundType

Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
Dim oDoc As Document
Dim oRefFile As FileDescriptor

For Each oDoc In oAsmDoc.AllReferencedDocuments
	ThisApplication.Documents.Open(oDoc.FullFileName, True)

	For Each oSketch In oDoc.ComponentDefinition​.Sketches
		oSketch.Visible = False
	Next

	'set work plane visibility
	For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
		oWorkPlane.Visible = False
	Next

	'set work axis visibility
	For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
		oWorkAxis.Visible = False
	Next

	'set work point visibility
	For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
		oWorkPoint.Visible = False
	Next

	Dim cam As Camera = ThisApplication.ActiveView.Camera

	If Not cam.ViewOrientationType = ViewOrientationTypeEnum.kIsoTopLeftViewOrientation Then
		cam.ViewOrientationType = ViewOrientationTypeEnum.kIsoBottomRightViewOrientation
		cam.Fit
		cam.Apply
	End If

	'set iproperty to use current view on save
	oDoc.SetThumbnailSaveOption _
	(ThumbnailSaveOptionEnum.kActiveWindowOnSave)

	'try to save 
	Try
		oDoc.Save
	Catch
		'catch error and do nothing 
	End Try

	'close the file
	oDoc.Close
Next

'Change back to original scheme
ThisApplication.ColorSchemes.Item(oColorScheme).Activate

'Change back to original back ground type
ThisApplication.ColorSchemes.BackgroundType = oBackGroundType

 

EESignature