1Download the “KOMPAS script”
On the part page set the dimensions, wait for the build and press the blue “KOMPAS script” button. You get a file like flange_kompas.m3m.
Put it in a separate folder: the part files will appear next to it.
The “KOMPAS script” is a macro that builds the part right inside KOMPAS, with a feature tree and variables. You can change dimensions through the variables in KOMPAS and the part rebuilds.
On the part page set the dimensions, wait for the build and press the blue “KOMPAS script” button. You get a file like flange_kompas.m3m.
Put it in a separate folder: the part files will appear next to it.
Start KOMPAS-3D. No need to open or create a document. In the menu choose Applications → KOMPAS-Macro.
The “Macro” window opens with a list of macros.
.m3m.You add a script once: next time it is already in the list. The build takes a few seconds.
KOMPAS opens the built part. It is also saved next to the script together with two service files.
The log and the report help if something went wrong: you can send them to us.
Open the Variables panel (the fx icon on the vertical bar on the left). The names are the same as on the site: DO, P1, N1. Change the number in the “Expression” column and press Enter: the part rebuilds.
Calculated variables update by themselves. The site’s checks don’t run in KOMPAS, so keep the dimensions valid yourself.
.kompas_log.txt and find the line Папка результатов: … (results folder). If the script folder is write-protected (e.g. “Program Files”), the files go elsewhere..kompas_log.txt and .kompas_report.json and tell us your KOMPAS version. Meanwhile you can take the STEP: it is built independently of KOMPAS.Plain Python text: the build plan (variables and operations) and a small player that passes them to KOMPAS. It downloads nothing and doesn’t touch other files.
Open it in any text editor to check it before running.
# Matilda 3D · flange PLAN = { "vars": [ ["DO", 140, "outer diameter"], ["P1", 90, "hole circle"], … ], "ops": [ … ] } play(PLAN)