Task Sheduler Examples Custom Tasks

Task Sheduler Examples Custom Tasks

bradeneuropeArthur
Mentor Mentor
838 Views
9 Replies
Message 1 of 10

Task Sheduler Examples Custom Tasks

bradeneuropeArthur
Mentor
Mentor

Doe anybody have "Task Scheduler" Examples for creating Custom Tasks via Vb.net?

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
839 Views
9 Replies
Replies (9)
Message 2 of 10

Frederick_Law
Mentor
Mentor
0 Likes
Message 3 of 10

Michael.Navara
Advisor
Advisor

You can easily create custom EXE application in VB.NET and use them in TaskSheduler. Sample is in attachment and here is the screen shot from TaskScheduler configuration. Sample is for Inventor 2024.

MichaelNavara_0-1700119551450.png

This custom task only prints the PartNumber and full file name of all *.ipt files in given directory. It uses ApprenticeServer. For full Inventor it is similar, but slower and little bit more code.

 

Message 4 of 10

bradeneuropeArthur
Mentor
Mentor

Hi @Michael.Navara ,

 

I have created a Console Application via Vb.net with this only in the Main sub:

bradeneuropeArthur_0-1700341687270.pngbradeneuropeArthur_1-1700341784336.pngbradeneuropeArthur_2-1700341815580.png

But nothing happens with the  task scheduler.

bradeneuropeArthur_3-1700342009414.png

 

Any idea what is wrong.

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 10

Michael.Navara
Advisor
Advisor

I'm not sure you can easily use MsgBox in console application without additional references to Windows.Forms etc. But I expect you successfully test your application.

In this case the issue can be in starting. 

 

I create new console application with following code and it work as expected. I only change MkDir to CreateDirectory function, because MkDir fails when directory exists.

 

Module Module1

    Sub Main()
        MsgBox("Test")
        'MkDir("C:\Temp\test")
        System.IO.Directory.CreateDirectory("C:\Temp\test")
    End Sub

End Module

 

 

Everything work as as expected.

0 Likes
Message 6 of 10

bradeneuropeArthur
Mentor
Mentor

Also without the MkDir the task does not run.

Don't know what is wrong.

 

If I debug the application selves it works correct. but with the task scheduler not.

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 10

bradeneuropeArthur
Mentor
Mentor

Please see the movie:

 

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 10

Michael.Navara
Advisor
Advisor

Try this steps, I don't know what's wrong 🤔

EDIT: Sample added

0 Likes
Message 9 of 10

bradeneuropeArthur
Mentor
Mentor

Hi, @Michael.Navara 

I have found the issue.

There is a difference in the Task Scheduler when pasting the path of the .exe file in the dialog.

You must use the search button and then add the exe and not copy and past the path, 

Thanks for supporting on this, appreciated...

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 10

Michael.Navara
Advisor
Advisor

That's it! 😉

You can use copy+paste, but you need to remove quotation marks ( " ) 

0 Likes