Easy Upgrade Tips

edited July 2023
Some tips on how to make upgrading Mecway / CCX / Gmsh and other things a bit easier.
These notes are well suited for someone administering to a group of users, but also useful for individuals.


1. Get latest CCX from dhondt.de site, from a hyperlink simply called "files"

It will look something like this: http://www.dhondt.de/calculix_2.20.1_4win.zip

Have a bat file to update related softwares. Copy to Public directory, IT/Windows Security won't complain.
The example below copies CCX, Gmsh into Public directory from a network drive.
rem ***** BEGIN sample_update_software.bat 
  
@echo off

 
@echo *****   Updating Calculix Solver                                                          
@echo *****   PASTIX is Default, switch using Library  CCX_custom_commands  PARDISO SOLVER      
c:
cd c:\Users\Public
echo The current directory is %CD% 

mkdir calculix_2.20_4win
cd    calculix_2.20_4win
 
xcopy /E /Y Z:\SOFTWARE\SOFTWARE\calculix_2.20_4win  .
cd ..

@echo *****   Update Gmsh Solver     *****
 
mkdir gmsh-4.10.5-Windows64
cd    gmsh-4.10.5-Windows64
 
xcopy /E /Y Z:\SOFTWARE\SOFTWARE\gmsh-4.10.5-Windows64  .
cd ..
 
pause

rem ***** END sample_update_software.bat 


2. Install latest Mecway, do a "Launch Mecway" and quit

3. Have a bat file to modify the user.config file

This file is located under the AppData directories, find it with this path:
   cd C:\Users\%username%\AppData\Local\Mecway_Limited\mec*\20.*  
Make a master.top file from the latest user.config, keeping all lines up the the last
 </setting> 
command

Make a master.bot file of that has the last few lines, it will look like this:

          </Mecway.My.MySettings>
        </userSettings>
    </configuration>


Make a "user.config sandwich" from the new user.config, with your updates and the user key in the middle:

   type master_user_config.top  your_user_config_updates.mid  master_user_config.bot > user.config

Replace the user.config in the same location C:\Users\%username%\AppData\Local\Mecway_Limited\mec*\20.*


Below is an example of customized user.config inputs
They point to a Mecway_Library, the GMsh and CCX software, a Python Script library, and some DefaultMeshingParameters.
These will overwrite existing settings above in the master_user_config.top, but everything else will stay the same.
            <setting name="LibraryPath" serializeAs="String">
                <value>Z:\SOFTWARE\Mecway_Library</value>
            </setting>
            <setting name="GmshPath" serializeAs="String">
                <value>C:\Users\Public\gmsh-4.10.5-Windows64\gmsh.exe</value>
            </setting>                       
            <setting name="CCXSolverPath" serializeAs="String">
                <value>C:\Users\Public\calculix_2.20_4win\ccx_dynamic.exe</value>
            </setting>            
            <setting name="Scripts" serializeAs="Xml">
                <value>
                    <ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                        <string>Z:\SOFTWARE\Mecway_Library\PythonScripts\AA_Python_QUICKREF.py</string>
                        <string>Z:\SOFTWARE\Mecway_Library\PythonScripts\center_of_circle_3pts.py</string>
                        <string>Z:\SOFTWARE\Mecway_Library\PythonScripts\solve_then_save.py</string>
                    </ArrayOfString>
                </value>
            </setting>        
            <setting name="DefaultMeshingParameters" serializeAs="String">
                <value>&lt;mesher elementspercurve="1" elementsperedge="2" grading="0.3" volume="true" quaddominated="true" quadratic="true" straightedges="true" /&gt;</value>
            </setting>  


4. User the Mecway_Library to easily switch solvers (see fig)




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!