# Revision control app macro (release)

**URL:** <https://forum.cadmunity.com/t/revision-control-app-macro-release/1557>\
**Category:** Macro Library\
**Created:** [March 23, 2022, 12:53pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557 "2022-03-23T12:53:57Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![sloworks](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sloworks/32/5197_2.png) [@sloworks](https://forum.cadmunity.com/u/sloworks)\
**Post date:** [January 8, 2024, 10:17am UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/21 "2024-01-08T10:17:24Z")

</div>

Hmm. One common revision for file to handle saving/restoring to/from repository. And then “subrevisions” for configurations and when one of those change, also the common revision changes? What am I missing, seems too simple?

---

<div class="post-metadata">

**Author:** ![jcapriotti](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/jcapriotti/32/24_2.png) [@jcapriotti](https://forum.cadmunity.com/u/jcapriotti)\
**Post date:** [January 17, 2024, 5:08pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/22 "2024-01-17T17:08:10Z")

</div>

Configurations are a sticky issue for revisions. For us they can represent a family of parts each with their own part number. But we can also have some that are for reference in a drawing. The sheet metal flat is a good example. So do you revision those as well? Today we revise all of them together so they are always the same letter.

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [January 17, 2024, 5:29pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/23 "2024-01-17T17:29:51Z")

</div>

> [@](#):
>
> Configurations are a sticky issue for revisions. For us they can represent a family of parts each with their own part number. But we can also have some that are for reference in a drawing. The sheet metal flat is a good example. So do you revision those as well? Today we revise all of them together so they are always the same letter.

Good point. I think the issue is that there is no distinction between the two in SW. It should be two separate things - physical products, or an alternative representations of a physical product.

---

<div class="post-metadata">

**Author:** ![jcapriotti](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/jcapriotti/32/24_2.png) [@jcapriotti](https://forum.cadmunity.com/u/jcapriotti)\
**Post date:** [January 17, 2024, 6:23pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/24 "2024-01-17T18:23:33Z")

</div>

> [@](#):
>
> Good point. I think the issue is that there is no distinction between the two in SW. It should be two separate things - physical products, or an alternative representations of a physical product.

I think I had a really old enhancement idea I submitted to have the ability to define different configuration types with different settings (Part number, reference use only, etc.) I think we got the derived configurations that kind of did some of that but not fully.

Today we somewhat handle it with a custom property editor that looks at configuration names for certain suffixes that we have standardized. The configuration name starts with the part number, then adds a suffix if needed for different cases.  
image.png

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [January 17, 2024, 7:08pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/25 "2024-01-17T19:08:52Z")

</div>

> [@](#):
>
> I think I had a really old enhancement idea I submitted to have the ability to define different configuration types with different settings (Part number, reference use only, etc.) I think we got the derived configurations that kind of did some of that but not fully.
> 
> Today we somewhat handle it with a custom property editor that looks at configuration names for certain suffixes that we have standardized. The configuration name starts with the part number, then adds a suffix if needed for different cases.
> 
> image.png

That is a neat workaround. I might actually borrow the idea for my projects too. But as far as revisions go, I still don’t know of any non-messy solution…

---

<div class="post-metadata">

**Author:** ![sloworks](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sloworks/32/5197_2.png) [@sloworks](https://forum.cadmunity.com/u/sloworks)\
**Post date:** [January 23, 2024, 3:55pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/26 "2024-01-23T15:55:27Z")

</div>

> [@](#):
>
> That is a neat workaround. I might actually borrow the idea for my projects too. But as far as revisions go, I still don’t know of any non-messy solution…

Still think this would work:  
One common revision for file to handle saving/restoring to/from repository. And then “subrevisions” for configurations and when one of those change, also the common revision changes.

---

<div class="post-metadata">

**Author:** ![JoshuaDeeMan](https://forum.cadmunity.com/letter_avatar_proxy/v4/letter/j/f14d63/32.png) [@JoshuaDeeMan](https://forum.cadmunity.com/u/JoshuaDeeMan)\
**Post date:** [March 21, 2024, 9:55pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/27 "2024-03-21T21:55:03Z")

</div>

This looks great. I work for a small company as the sole engineer and we don’t have a PDM currently so I think this will be hugely helpful as I try to bring order to revision control.

I downloaded V3 first and can’t get it to run. I tried debugging and got a compile error “Sub or function not defined” and it highlighted “SetAppEnabling” on the MainForm.

I tried the other versions to see if they would work and both of them seemed to do fine.

Thanks in advanced!

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [June 13, 2024, 7:43pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/28 "2024-06-13T19:43:59Z")

</div>

> [@AlexLachance](#):
>
> Hmm, okay, that could work. So, you’re suggesting the archive would be one folder up…

In my new job we will definitively implement this tool, with the options you provided in v3 we can configure it just like I need.  
But I cannot get the “Restore” function to work, I get this message:  
2024-06-13\_024820-Microsoft Visual Basic for Applications - Version\_control\_app [running].png  
I run the macro from a button and the method called is “core.main”.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [June 26, 2024, 8:44pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/29 "2024-06-26T20:44:01Z")

</div>

> [@](#):
>
> In my new job we will definitively implement this tool, with the options you provided in v3 we can configure it just like I need.  
> But I cannot get the “Restore” function to work, I get this message:  
> 2024-06-13\_024820-Microsoft Visual Basic for Applications - Version\_control\_app [running].png
> 
> I run the macro from a button and the method called is “core.main”.

laukejas if you have a chance to look into this I would really appreciate!

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [June 27, 2024, 11:26am UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/30 "2024-06-27T11:26:40Z")

</div>

> [@](#):
>
> @laukejas if you have a chance to look into this I would really appreciate!

Hi Marc, sorry for the delay. I am not sure what that error is about, I haven’t seen it before. Can you click on “Aide” when that error appears, and show me what the application does then? Maybe make a video of the whole thing? Does this happen with any SW document? Please send this as PM, we will figure it out there.

> [@josh](#):
>
> This looks great. I work for a small company as the sole engineer and we don’t have a PDM currently so I think this will be hugely helpful as I try to bring order to revision control.
> 
> I downloaded V3 first and can’t get it to run. I tried debugging and got a compile error “Sub or function not defined” and it highlighted “SetAppEnabling” on the MainForm.
> 
> I tried the other versions to see if they would work and both of them seemed to do fine.
> 
> Thanks in advanced!

Hi Joshua, same thing - please make a video and send it to me as PM. Macros are difficult to debug from another computer 🙂

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [July 22, 2024, 1:18pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/31 "2024-07-22T13:18:10Z")

</div>

> [@](#):
>
> Hi Marc, sorry for the delay. I am not sure what that error is about, I haven’t seen it before. Can you click on “Aide” when that error appears, and show me what the application does then? Maybe make a video of the whole thing? Does this happen with any SW document? Please send this as PM, we will figure it out there.  
> …

I don’t know what is happening but the DM I wrote is still in my “Outbox” and I can’t get it out…

Here it is:

Hi and thanks a lot for the time you put into this!  
I join a video capture of what happens when I try to restore a previous version.  
Enregistrement 2024-07-16 091707.mp4  
When using the previewing function it works fine.

I made some changes so we can use our workflow, but I don’t think I changed anything that would would have break this part of the macro.

Thanks!

-Marc

---

<div class="post-metadata">

**Author:** ![PaoloG](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/paolog/32/147_2.png) [@PaoloG](https://forum.cadmunity.com/u/PaoloG)\
**Post date:** [July 23, 2024, 9:04am UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/32 "2024-07-23T09:04:54Z")

</div>

Hi, it’s not your fault: the problem is that the button invokes the Core.Restore function, which doesn’t exist. The right function is Core.Replace…it’s a small typo on the original file…

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [July 23, 2024, 1:34pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/33 "2024-07-23T13:34:44Z")

</div>

> [@](#):
>
> Hi, it’s not your fault: the problem is that the button invokes the Core.Restore function, which doesn’t exist. The right function is Core.Replace…it’s a small typo on the original file…

That’s it!! It works!!

Thanks a lot, this tool will be so useful!

---

<div class="post-metadata">

**Author:** ![PaoloG](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/paolog/32/147_2.png) [@PaoloG](https://forum.cadmunity.com/u/PaoloG)\
**Post date:** [July 23, 2024, 3:35pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/34 "2024-07-23T15:35:56Z")

</div>

You’re welcome, it’s nothing! I’m also using this very useful macro (thanks so much @Laukejas!)…I’m also making some useful changes to the work system used in my office…as soon as I finish them I’ll post them here, in case they help others!

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [August 7, 2024, 6:47am UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/35 "2024-08-07T06:47:41Z")

</div>

Hi guys, sorry for the delay, I was neck-deep in other work. I fixed all of the issues that were reported so far. That includes mgibeault , JoshuaDeeMan and Kn1ght. I didn’t have a chance to test it very thoroughly, so if I made any new bugs, let me know, I should be able to fix them fast now. Attaching the V4 to this post.

**Release V4**

**Bug fixes:**  
-Sometimes the UI would be greyed out when launched.  
-It was impossible to increase the version past 10.  
-Error due to missing (depreciated) SetAppEnabling function.  
-Error when calling Restore function.  
  
  
It appears that this macro has gotten a lot more attention than I expected, but I struggle to find the time to maintain it properly. I wanted to post it to Github so that others could maintain/improve it as well, (for example, PaoloG said you wanted to add some new features), making it a community project, but I don’t know how to connect SW VBA editor to Github, it does not seem to support any kind of version control, and the .swp files seem to be obfuscated, making it impossible to merge changes via Git command line. Does anyone know a way around it?

Otherwise, I could convert it to an add-in, which is fully compatible with Github via Visual Studio, but it would hurt the ease of deployment and use for the users. What do you guys think would be the best solution here?

---

<div class="post-metadata">

**Author:** ![AlexB](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/alexb/32/63_2.png) [@AlexB](https://forum.cadmunity.com/u/AlexB)\
**Post date:** [August 7, 2024, 12:28pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/36 "2024-08-07T12:28:53Z")

</div>

> [@](#):
>
> I wanted to post it to Github so that others could maintain/improve it as well, (for example, @PaoloG said you wanted to add some new features), making it a community project, but I don’t know how to connect SW VBA editor to Github, it does not seem to support any kind of version control, and the .swp files seem to be obfuscated, making it impossible to merge changes via Git command line. Does anyone know a way around it?

The method I’ve seen is to just do a _File =\> Export File_ and then upload all of the .bas files. You can do this for the forms too and it will spit out 2 files. One for the code and one for the form design but the document for the form design is still in a serialized/unreadable format.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [August 7, 2024, 1:38pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/37 "2024-08-07T13:38:55Z")

</div>

> [@](#):
>
> Hi guys, sorry for the delay, I was neck-deep in other work. I fixed all of the issues that were reported so far. That includes @mgibeault , @JoshuaDeeMan and @Kn1ght. I didn’t have a chance to test it very thoroughly, so if I made any new bugs, let me know, I should be able to fix them fast now. Attaching the V4 to this post.
> 
> **Release V4**
> 
> **Bug fixes:**  
> -Sometimes the UI would be greyed out when launched.  
> -It was impossible to increase the version past 10.  
> -Error due to missing (depreciated) SetAppEnabling function.  
> -Error when calling Restore function.  
>   
>   
> It appears that this macro has gotten a lot more attention than I expected, but I struggle to find the time to maintain it properly. I wanted to post it to Github so that others could maintain/improve it as well, (for example, @PaoloG said you wanted to add some new features), making it a community project, but I don’t know how to connect SW VBA editor to Github, it does not seem to support any kind of version control, and the .swp files seem to be obfuscated, making it impossible to merge changes via Git command line. Does anyone know a way around it?
> 
> Otherwise, I could convert it to an add-in, which is fully compatible with Github via Visual Studio, but it would hurt the ease of deployment and use for the users. What do you guys think would be the best solution here?

I look forward to check that, I use your macro everyday!  
I made some changes so it was easier to integrate to our workflow. So my preference is to continue sharing macros here, we can integrate your changes without loosing our work. But then, I know nothing of software development and what is possible/easier.

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [August 7, 2024, 2:43pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/38 "2024-08-07T14:43:35Z")

</div>

> [@](#):
>
> The method I’ve seen is to just do a _File =\> Export File_ and then upload all of the .bas files. You can do this for the forms too and it will spit out 2 files. One for the code and one for the form design but the document for the form design is still in a serialized/unreadable format.

I tried it, but it appears that this has to be done for every class file in the macro? There are like 10 in mine… Not very convenient. But still, it’s better than nothing, thank you. Though I hope there is an easier way 😆

> [@](#):
>
> I look forward to check that, I use your macro everyday!  
> I made some changes so it was easier to integrate to our workflow. So my preference is to continue sharing macros here, we can integrate your changes without loosing our work. But then, I know nothing of software development and what is possible/easier.

Great to hear that! Okay, feel free to share it here, but let me know what has been changed exactly, so I can merge your improvements into the main macro.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [August 7, 2024, 4:28pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/39 "2024-08-07T16:28:48Z")

</div>

> [@](#):
>
> Great to hear that! Okay, feel free to share it here, but let me know what has been changed exactly, so I can merge your improvements into the main macro.

It’s mostly changing some constants and some terminology.  
For example we use Phase / Revision instead of Branch / Version

While updating my version something weird ![grumph](https://forum.cadmunity.com/uploads/default/original/1X/8bc095a3ae1d52afa1048c8e85630907ebb470b7.gif "grumph") happened.  
Both versions (my v3 and the new v4) were opened in the Macro Editor and I was comparing the modules, updating what needed to be.  
Now, when I open my version everything has been overwritten! My changes are aren’t there!  
When I open backup files I made this morning, they too are “reset” and don’t have my edits ![o[](https://forum.cadmunity.com/uploads/default/original/1X/03590d98a359a447ce7713c78201cdb8a8cfdb6b.gif "cant..believe...")  
What’s up???

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [August 7, 2024, 4:54pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/40 "2024-08-07T16:54:23Z")

</div>

Is it a problem with the Macro Editor?  
When I run the macro from SW it runs with my modifications…

[Previous page](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557.md?page=1)

[Next page](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557.md?page=3)
