Next steps: After developing a decent solution for my company.

Started by djroulette, May 25, 2020, 02:51:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

djroulette

I have developed a solution (to make my and my co-worker's job easier) using VBA and a combination of Visio, Excel, and Word.  Visio is used as the main GUI, there are 2 stencils (Floor plan shapes, and rack shapes).  Each of the shapes have default data (part numbers, accessories, instructions, labor, etc).  Once the user is finished laying out all of the shapes, up to 15 documents are created from the Visio program.  Some are created with Excel (Bill Of Materials that can be imported into our CRM tool to create quotes), some are created with Word (Scope Of Work, and several checklists for other co-workers).  I have a few questions and I don't know where to start (Google searches are bringing up old data):

What is the best way to handle maintenance and upgrades of the program, I'm used to using classes, interfaces, and other OOP principles and patterns in C#, which would make this easy.  Currently I have a macro Visio file titled "v2.5.2" or whatever the current version number is,  I then copy, paste, rename, when I'm changing the file.  I see that in 2010 Visio there is a C# SDK, is this still the case for current versions?  If so where is the best place to learn about this?

What is the best way to handle distribution?  I have a total of 3 co-workers that are currently using it, they (and I) copy and paste the current version and rename it to the job name.  We then open the macro enabled Visio program and do our work, the exported files end up in a folder titled with the job name, we want to keep the visio file for the job because if something changes on the job, we have 1 place to change it and all of our documentation is updated?  Would this be a great fit for an add-in?  If so how do I create one and distribute it?  I don't know who all will eventually use the program (it will be limited to the engineering department).  I also don't plan on being at the company in 5 years, so I would like to make it easy for them to get a new team member up and going easily.

Thanks for the help!

Paul Herber

The Visio SDK has examples for VB, C# and C++, and I think this is true right up to Visio 2019.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Yacine

Visual Studio is certainly the best way to handle a professional Visio solution. The vsto - Visual Studio Tools for Office - are the tools of choice.

On a lower level you can handle a small solution - like yours with only 3-4 users with the office on-board tools. Some considerations however:
- separate code from data- eg: pack your solution in a combination of template and stencil. Store the code in the stencil and all the drawing tweeks in the template.
- you may store a version number of the stencil in a field - but you'll not really need it. Keep its name fixed, make safety archives (with dates and ammendment notes) and replace the current stencil by newer one.
- make the solution to use only that one central stencil from wherever it is used. If you want it a little more fancy you may allow the user to make a copy of the stencil and use an arbitrary location. You'd store this location in the drawing. --> risky for updates.

my 2 cents,
Y.
Yacine

cliff50

i made a similar solution some years back.
the method of distribution as described :


the most current solution is placed on a common server, along with a text file that has the dates time (chronological history)  listed. and a text file that indicates lock for editing.

desktop launch icon:
is VBA coded.
to check the common server time date of latest and compare to the local version time date.
if the server solution is more recent, then download and write over the local version of the solution.
else
open the local version of the solution.

also
if the solution is opened for editing, then lock the server version for editing.

after the editing session
then upload local version to write over the common server version and
time date stamp the history text file and unlock the lock text file.

djroulette

Quote from: cliff50 on May 26, 2020, 12:22:14 AM
i made a similar solution some years back.
the method of distribution as described :


the most current solution is placed on a common server, along with a text file that has the dates time (chronological history)  listed. and a text file that indicates lock for editing.

desktop launch icon:
is VBA coded.
to check the common server time date of latest and compare to the local version time date.
if the server solution is more recent, then download and write over the local version of the solution.
else
open the local version of the solution.

also
if the solution is opened for editing, then lock the server version for editing.

after the editing session
then upload local version to write over the common server version and
time date stamp the history text file and unlock the lock text file.

Where are you doing the VBA code for the desktop icon?  I didn't think Visio had the ability to do file handling (I'm having Visio call Excel so the user can select files to import into the Visio program).  I though about doing something similar to this, if you happen to have any examples and you're willing to share, I would be very appreciative.