3/29/2021 0 Comments Task Scheduler To Run Macro
I posted before taking a few days off not anticipating such a quick response.This tool uses JavaScript and much of it will not work correctly without it enabled.
All Places APIMacros Questions Log in to create and rate content, and to follow, bookmark, and share content with other members. Answered Assumed Answered Run Macro in Task Scheduler Question asked by Alex Graff on Mar 11, 2015 Latest reply on Apr 16, 2015 by Alex Graff Like Show 2 Likes 2 Comment 8 Hello, I just started writing macros yesterday so I am very new to this. By sifting through various forums and many discussions on this forum I managed to create a macro to do what I need. With a drawing open it deletes the current revision table and inserts a new revision table in the proper location. It isnt quite perfect because I was having trouble with the proper anchor location but somehow it is working. I now need a way to run this in task scheduler so it will open, change the revision table and save all the drawings in a given directory. Like I said it is bits and pieces that I put together that I found so I cant take much credit for the work done. I am not familiar with the namespace and arguments everything uses so it might be a little messy still. Task Scheduler To Run Ro Update It AndI believe I need to take what I have and update it and save it as a.swb file. I am just getting to the point where I am getting lost with only minimal programming experience and only a day in SolidWorks API. Task Scheduler To Run Ro Code Below IsThe code below is what I have working as a macro on an open file. I am getting lost when it comes to opening changing and saving multiple files in a folder. It took me 6 hours to get only as far as I am so I figured it was time to reach out for help. If I cant get this working Im stuck doing all several hundred drawings by hand, which wont be as bad as it was now that I at least have a macro. If your goal is to simply have the macro process every part in a folder, use the VBA Dir() function. For example, here is how to open all parts in a specified folder: Dim swApp As SldWorks.SldWorks. Const folder As String C:SolidWorks Training FilesEssentialsLesson01Case Study. End Sub Keith SolidWorks API Training See the reply in context No one else had this question Mark as assumed answered Outcomes Visibility: APIMacros 7221 Views Last modified on Mar 11, 2015 9:14 AM Categories: API SolidWorks This content has been marked as final. Show 8 comments 8 Replies Name Email Address Website Address Name (Required) Email Address (Required, will not be published) Website Address Keith Rice Mar 11, 2015 11:02 PM Unmark Correct Correct Answer Check out this blog post: Schedule Macros Using the Task Scheduler I should note, however, that the only reason to use the Task Scheduler with macros is that you can schedule them to run at a certain time. End Sub Keith SolidWorks API Training Like Show 0 Likes 0 Actions Alex Graff Keith Rice on Mar 16, 2015 7:46 AM Mark Correct Correct Answer Thank you for your response.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |