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: 

Thumbnail form custom Content Center library. Can you get the normalt thumbnail ?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Darkforce_the_ilogic_guy
261 Views, 6 Replies

Thumbnail form custom Content Center library. Can you get the normalt thumbnail ?

Thumbnail form custom Content Center library. Can you get the normalt thumbnail ?

 

I would like to see the current file and not an standard thumbnail form content center

 

 

like this 

 

bt_0-1671614720575.png

 

not like this

bt_1-1671614744270.png

 

is this possible ?

6 REPLIES 6
Message 2 of 7

Is this what you need?

 

bradeneuropeArthur_0-1671616578614.png

 

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 3 of 7

No.  I need to be ably to see the finished part. We are using Content center to create custom part with a lot of properties on.  so we start out selecter a round bars Ø35 x lenght  by using the Counter Center as custom 

bt_0-1671620321214.png

 

then we might add some more feature after that.. Today All Round bart thoumbnail looks like this

 

bt_1-1671620455315.png

no matter what we have done with it.. I want to see the real part that might look like this

 

bt_2-1671620525208.png 

or 

bt_3-1671620545590.png

 or 

bt_4-1671620602189.png

 

 

 

 

Message 4 of 7

This is a document setting. Change it in iProperties window -> Save

MichaelNavara_0-1671623877470.png

 

Message 5 of 7

Looks like that work.  is that a change i need to make on the templete file  or  a setting in inventor .. If I want all files like that ?

 

thanks for the help so fare 😀

Message 6 of 7

In my opinion it is not possible to change this setting in template, because each family in ContentCentrer has it's own template 

 

But you can switch it by simple iLogic script (before save, after new, etc.).

 

Dim doc As Document = ThisDoc.Document
doc.SetThumbnailSaveOption(ThumbnailSaveOptionEnum.kActiveComponentIsoViewOnSave)
Message 7 of 7

If it's useful to anyone, I run this from Part or Assembly level to modify ALL parts to ISO view of Thumbnail. Enjoy.

Public Sub Main()

	If ThisApplication.ActiveDocumentType = DocumentTypeEnum.kPartDocumentObject Then
		Dim oDoc As PartDocument = ThisApplication.ActiveDocument
		Try			
			'set iproperty to use ISO view on save
			oDoc.SetThumbnailSaveOption _
			(ThumbnailSaveOptionEnum.kActiveComponentIsoViewOnSave)
			
			'save the file
			oDoc.Save
		Catch
		End Try

	ElseIf ThisApplication.ActiveDocumentType = DocumentTypeEnum.kAssemblyDocumentObject		

		Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument
		Dim oFileInfo As String = oDoc.FullFileName
		
		Dim result = MessageBox.Show("You're running multiple parts in this Assembly " & vbCr & fileName & vbCr & "Do you want to continue??", "Run GS and Other Rules", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
		If result = vbOK Then
			RunExternalRules
		Else
			Return
		End If
		
		Dim oProgressBar As Inventor.ProgressBar
		oProgressBar = ThisApplication.CreateProgressBar(False, PartCount, oMessage, True)
	
	End If

End Sub

Sub RunExternalRules
	
	Dim oDoc As AssemblyDocument
	oDoc = ThisApplication.ActiveDocument
	Dim iDoc As Document
	
	'Set counter for counting parts
	Dim iPartCount As Integer
	iPartCount = 0
	
	'Progress bar
	oMessage = "Editing All Parts And Saving, Please Wait..."
	PartCount = oDoc.AllReferencedDocuments.Count
	
	Dim oProgressBar As Inventor.ProgressBar
	oProgressBar = ThisApplication.CreateProgressBar(False, PartCount, oMessage, True)
	
	Dim assembly As Inventor.AssemblyDocument = ThisDoc.Document	
	'Iterate through all of the occurrences in the assembly
	For Each iDoc In oDoc.AllReferencedDocuments
		
		iPartCount = iPartCount + 1		
		Dim fileName As String  = IO.Path.GetFileNameWithoutExtension(iDoc.FullFileName)
				
		'Update the progress bar
		'If UserWantsToCancel Then Return
		oProgressBar.Message = ("Working on part " & iPartCount & " of " & PartCount & " | " & fileName)
		oProgressBar.UpdateProgress		
	
		Try
			ThisApplication.Documents.Open(iDoc.FullFileName)
			'set iproperty to use ISO view on save
			IDoc.SetThumbnailSaveOption _
			(ThumbnailSaveOptionEnum.kActiveComponentIsoViewOnSave)
			
			'save the file
			iDoc.Save
			iDoc.Close
		Catch
			iDoc.Close
		End Try		
	Next
	
	oProgressBar.Close
		
End Sub

Private Function UserWantsToCancel(oprogressBar As Inventor.ProgressBar)
	If (UserClickedOnCancel) Then
		MsgBox("User clicked cancel and it has been detected now.")
		
		' Add code here for clean exit of the rule.
		' If you work with transactions then this could be 
		' the place To role back any changes
		
		oprogressBar.Close()
		Return True
	End If
	Return False
End Function

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report