Revision control app macro (release)

Library for macros
laukejas
Posts: 192
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 42
x 108

Re: Revision control app macro (release)

Unread post by laukejas »

Hi guys, sorry for my absence, for some reason I was not getting notifications, and now like 5 of them arrived at once :shock: I am looking into this issue as we speak. If there is no NDA or anything, could you please share at least one file (and it's revision history files) that shows the "subscript out of range" error, or missing revisions in the list? I can't seem to replicate either of these issues. If I had some samples, I could finally nail this down.

P.S. I think the issue was the revision sorting algorithm, I rewrote it, but I still want to test it with some of problematic files to ensure I didn't miss something.
User avatar
SPerman
Posts: 2035
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2200
x 1859
Contact:

Re: Revision control app macro (release)

Unread post by SPerman »

mgibeault wrote: Tue Nov 05, 2024 12:51 pm Frustrating... it worked well for months and now this.
The only thing that happened is that I showed how to use it to a co-worker. It did not work on his computer, but I'll debug that after, if I manage to get it working again on mine.
I think the root problem will be that the filename doesn't have an underscore. Figuring out where, in all of that code, the filename is selected and fed to the function is a different question.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
mgibeault
Posts: 81
Joined: Thu Nov 17, 2022 9:07 am
Answers: 1
x 108
x 64

Re: Revision control app macro (release)

Unread post by mgibeault »

laukejas wrote: Tue Nov 05, 2024 2:07 pm Hi guys, sorry for my absence, for some reason I was not getting notifications, and now like 5 of them arrived at once :shock: I am looking into this issue as we speak. If there is no NDA or anything, could you please share at least one file (and it's revision history files) that shows the "subscript out of range" error, or missing revisions in the list? I can't seem to replicate either of these issues. If I had some samples, I could finally nail this down.

P.S. I think the issue was the revision sorting algorithm, I rewrote it, but I still want to test it with some of problematic files to ensure I didn't miss something.
Here's a file and it's versions from the Repo folder. I don't know why there's no "A.1" version. To be sure it was not a cause to the problem I duplicated A.2 and renamed to A.1 but it changes nothing.
When I run the macro on this file, "Phases" and "Revision" change results in the "subscript out of range" error. The drop-down shows nothing.
231130-416.zip
(1.02 MiB) Downloaded 34 times
laukejas
Posts: 192
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 42
x 108

Re: Revision control app macro (release)

Unread post by laukejas »

mgibeault wrote: Tue Nov 05, 2024 3:55 pm Here's a file and it's versions from the Repo folder. I don't know why there's no "A.1" version. To be sure it was not a cause to the problem I duplicated A.2 and renamed to A.1 but it changes nothing.
When I run the macro on this file, "Phases" and "Revision" change results in the "subscript out of range" error. The drop-down shows nothing.231130-416.zip
Thank you! I think the issue was indeed the sorting algorithm that I changed from v3 to v4 (if I remember right). I tested your files with updated version, and it seems to work correctly now, but please check yourself to make sure. Attaching the v5_beta. Changes I made, this is from my changelog in progress:
  • Rewrote the sorting algorithm, added a few helper functions to Utilities. Should fix the "subscript out of range" issue.
  • The application will no longer automatically lock Released documents (make them read-only, lock external references and enable freeze bar), but will prompt the user by default. If you prefer to always lock these references (old behavior), or to never lock, edit the value of Constants.LOCK_RELEASED_DOCS_OPTION. As a result of this change, SET_RELEASED_VERSIONS_FREEZEBAR and SET_RELEASED_VERSIONS_LOCK_REFS have been deprecated.
  • Additional Actions -> "Delete version history" was renamed into "Set new tracking ID", and the prompt rewritten to make it less confusing. The actual functionality did not change, but it should be clearer what this function does: it starts a new tracking history to the current document starting with revision A.1. Intended usage is when you save a tracked part with SOLIDWORKS Save As, and want to have a separate tracking history for this new file without deleting the old one.
  • Eliminated the confusing "the key is already associated with this collection" error. It happens when you save a tracked part with SOLIDWORKS Save As, but do not assign a new tracking number. The application will now recognize this, and warn the user.
  • Renamed some constants and functions.
  • Some refactoring.
Can you please check if everything is working now? Please don't forget to change the Constants to your custom settings. If something is not working, please enable the Debug mode and make a screenshot or two.

EDIT: I see lots of people are downloading it already, so please tell me of any issues that you find. I would like this V5 to be the final version, free of any remaining bugs, because I got lots of other projects going on, and I don't think I will have much time in the future to maintain this :roll: Besides, it has already grown past what a macro is meant for, and should be better-off re-written as an add-in... Nevertheless, if anyone wants to take over the development afterwards, feel free. Macro is open source project by definition anyway :D
Attachments
Version control app V5_beta.swp
(590.5 KiB) Downloaded 33 times
Post Reply