Just now, if the program is run from the command line, only PMX and FRD files can be read. It would be nice to have an ability to import geometry, mesh and INP files by
prepomax.exe -i <file_name>.
command. It allows to use PrePoMax more widely inside CMD and BAT files. Additionally, the program could be used as a fast viewer for this files.
Perhaps β-u <set_number>β key for the default unit set will also be useful just to avoid unit selection every time when the program starts.
The source code now includes the support for command-line arguments.
There is no switch necessary for defining a file open or file import. Only the file name with the whole path and extension <path/file_name.extension>. All PrePoMax extensions are supported:
I have compiled a new development version. As usual it is available at my educational web page. Unfortunately command line reading of geometry files works only for STL file format. For STEP and IGS the following error message is shown:
02/14/22 09:50:26 Set new model properties: Model space: 3D, Unit system: mm, ton, s, Β°C
02/14/22 09:50:26 Import file: test_cube.STEP
02/14/22 09:50:26 Running command: C:\Tools\PrePoMax_dev\NetGen\NetGenMesher.exe STEP_ASSEMBLY_SPLIT_TO_COMPOUNDS "test_cube.STEP" "C:\Tools\PrePoMax_dev\Temp\DIVbi7J1....
02/14/22 09:50:26 brep"
02/14/22 09:50:26 Reading STEP file: test_cube.STEP
02/14/22 09:50:26 Error reading in STEP File: test_cube.STEP
The same file can be imported to PrePoMax via File / Import without any problems. Test files are attached. test_cube.zip (5.3 KB)
I have tried your version of the PrePoMax and it works. You must use the whole path of the file to import like: βC:\Temp\test_cube.STEPβ. I see my instructions were a little misleading so I added the path to the file name now.
At the moment we have the following situation with this new feature:
There is no need to add the full path for PMX, FRD and even STL files
You have to add the full path for CAD files in STEP or IGES formats (I have not tested other formats yet)
It could be a bit confusing for some users, however it allows to start using this feature.
I did not test all file formats but I think (it should be like that) that all files must contain a full path. The exception are only files in the same path as the executable or in the shortcuts working folder. This is the default behaviour of the operating system. The file without the path can not be found on the system otherwise.
The problem is that STEP and IGES files need full path even if these files are in the same folder as PrePoMax. This is the very uncommon for any operational system.
Second, if all files are in the working directory, command like
<Full_path_to_PrePoMax>\prepomax.exe file.ext
works well for PMX, FRD, INP and even STL files and does not work for STEP and IGES files. For these two types of files you need to add the full path. Again, it is very uncommon.
Now I finally understood where is the problem. I fixed it and now it should work as expected. I newer put geometry or model files in the exe directory so I only tested all other directories. If everything works as expected please close the topic.