Inventor Thumbnail Generation

Inventor Thumbnail Generation

Bryan-Kelley
Enthusiast Enthusiast
1,486 Views
22 Replies
Message 1 of 23

Inventor Thumbnail Generation

Bryan-Kelley
Enthusiast
Enthusiast

Hello Everyone,

 

  We have ~100K Inventor dwg files within Autodesk Vault Professional that do not have their Thumbnails ('Save Preview Picture" toggle turned on). There are >150K Inventor dwg within the same Vault that do.  Previously, the drawing template file had that toggle turned off, that has since been altered.

 

  What I want to do is take all the dwg files that have that toggle off, open up the file, update it, save it, close it, check it in.

 

  If anyone has done something similar in the past, I would like to know how you approached it.  iLogic, VB, etc.

 

Thank you,
Bryan

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
1,487 Views
22 Replies
Replies (22)
Message 2 of 23

bradeneuropeArthur
Mentor
Mentor

With this it should work:

Dim d As Inventor.FileDialog

 Call ThisApplication.CreateFileDialog(d)
d.MultiSelectEnabled = True
d.Filter = "Inventor Drawing|*.dwg"
d.ShowOpen
d.CancelError = False
If Not d.FileName = "" Then
	Dim a() As String = Split(d.FileName, "|")

i=0
For i = 0 To UBound(a)
Dim dwg As Inventor.DrawingDocument	
dwg = Nothing
	dwg = ThisApplication.Documents.Open(a(i))
	 ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckOut").Execute
	 Call dwg.SetThumbnailSaveOption(ThumbnailSaveOptionEnum.kActiveComponentIsoViewOnSave)
	 ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckIn").Execute
dwg.save dwg.close(True) Next End If

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 3 of 23

Bryan-Kelley
Enthusiast
Enthusiast

Hello bradeneuropeArthur,

 

  Thank you for the reply.  Ideally, I'd like to place this within the C:\Users\Public\Documents\Autodesk\Inventor 2020\Macros\Default.ivb or within iLogic using an External Rule and have it run after opening each DWG file.  Whether or not the file has the thumbnail enabled or not.  But I do not need it to Check-In the files, I'll do that with Task Scheduler.

 

  My plan was:

  1. Use Task Scheduler to run a Sequential Task consisting of:
    1. Get & Check Out 1,000 DWG files at a time.
    2. Migrate the DWG files. (This step would be where the Save Preview Picture setting would be toggled.)
    3. Check In the 1,000 DWG files.
  2. Repeat this process ~100 times to get all the files updated correctly within one of the Vaults.

  When I run this as an iLogic function, it opens the Open dialog and I can select multiple files, but ideally, it would be used in the manner described above.  It needs to enable the Save Preview Picture toggle after the file is opened but nothing else beyond that.  Thank you again for your input, it is greatly appreciated.

 

Sincerely,

 

Bryan Kelley

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 4 of 23

bradeneuropeArthur
Mentor
Mentor

You can also write your own tasksheduler task for it using Vb.net.

It works also fine.

Are you familiar with this?

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 5 of 23

Bryan-Kelley
Enthusiast
Enthusiast

No, I was one of the product designers for Inventor from 2004-2016, but never did any programming/development.  

 

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 6 of 23

bradeneuropeArthur
Mentor
Mentor

This is the same code for vba:

without Check in:

 

Public Sub l()


Dim d As FileDialog

Call ThisApplication.CreateFileDialog(d)
d.MultiSelectEnabled = True
d.Filter = "Inventor Drawing|*.dwg"
d.ShowOpen
d.CancelError = False
If Not d.FileName = "" Then
Dim a() As String
a = Split(d.FileName, "|")

i = 0
For i = 0 To UBound(a)
Dim dwg As Inventor.DrawingDocument
Set dwg = Nothing
Set dwg = ThisApplication.Documents.Open(a(i))
ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckOut").Execute
Call dwg.SetThumbnailSaveOption(ThumbnailSaveOptionEnum.kActiveComponentIsoViewOnSave)
'ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckIn").Execute
dwg.Save
dwg.Close (True)
Next

End If
End Sub

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 7 of 23

bradeneuropeArthur
Mentor
Mentor

@Bryan-Kelley wrote:

No, I was one of the product designers for Inventor from 2004-2016, but never did any programming/development.  

 


I can create it for you!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 8 of 23

Bryan-Kelley
Enthusiast
Enthusiast

That would be incredibly fantastic.

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 9 of 23

bradeneuropeArthur
Mentor
Mentor

so resume:

you can use from Task Sheduler

  1. Default Build In Task Check Out files
  2. New Custom Task that creates the Thumbnail for file
  3. Default Build In Task Check In files

You need something only for 2 Correct?

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 10 of 23

Bryan-Kelley
Enthusiast
Enthusiast

Yes, that's correct, just for task #2.

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 11 of 23

bradeneuropeArthur
Mentor
Mentor

can it run for a specific folder?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 12 of 23

Bryan-Kelley
Enthusiast
Enthusiast

Ugh...  Yes.  My plan overall plan will not work since the files exist within an large amount of folders.

 

I would have to do them in clusters that grab just the DWG files from Vault in folders, then work on each folder and then check them back in.  But the folder location would vary, but for each task/step, it would remain the same.

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 13 of 23

bradeneuropeArthur
Mentor
Mentor

As you can see in the TS custom task you can give one parameter with it!

We could use the parameter "c:\your workspace" for it. 

 

Then I can do something like this

 

For Each file in folder

Do create thumbnail

For Each folder In folder loop...

 

Would this be an idea 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 14 of 23

Bryan-Kelley
Enthusiast
Enthusiast

That seems very reasonable.  

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 15 of 23

bradeneuropeArthur
Mentor
Mentor

I have a CustomTask Ready for you!

Example of the Path:

bradeneuropeArthur_0-1628630878541.png

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

Message 16 of 23

matt_jlt
Collaborator
Collaborator

Any chance you could share the project files for that?

 

I haven't looked into creating a custom task before, I couldn't find much info on how to do it / visual studio templates.

My best guess is that's its just a standard .net executable file, you import inventor dll and have a main sub that passes the variable (directory string) through the task manager interface and it creates a new inventor object and runs the command etc.

 

Thanks, Matt.

0 Likes
Message 17 of 23

Bryan-Kelley
Enthusiast
Enthusiast

Hello bradeneuropeArthur,

 

  I was finally able to try this out this morning, but it didn't seem to do anything.  Here is the process I used:

  1. Within Autodesk Vault, I did a Get... w/Check Out on 100 Inventor DWG files which do not have their thumbnails
  2. Placed the TaskShedulerThumbNail.exe in the C:\ADSK_VAULT folder.
  3. Create Task, Custom Task..., then pointed to the following settings.

BryanKelley_0-1628867560340.png

 

It runs for 4-5 seconds with no errors, then stops showing Complete - Successful, but there are no changes in the 100 files within the subfolders.

 

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 18 of 23

bradeneuropeArthur
Mentor
Mentor

What version of inventor.

It is made for 2022!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 19 of 23

Bryan-Kelley
Enthusiast
Enthusiast

It is running Inventor 2022.1 and Vault 2022.1 Update.  

 

BryanKelley_0-1628870018128.png

BryanKelley_1-1628870066471.png

 

The DWG files are still in 2020.x.x format.  Is that the issue?

 

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes
Message 20 of 23

Bryan-Kelley
Enthusiast
Enthusiast

So just a simple folder with just 48 files in it.  4 of the DWG files had their thumbnails, but the majority do not.

 

BryanKelley_0-1628873852696.png

 

Thanks,
Bryan

Bryan Kelley | Sr. CAD Administrator | Columbia Machine | www.colmac.com
0 Likes