BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad Python API
About automating tasks in Archicad using the Python API.

store selection set as .mod




currently we are working on housing projects with appartment-types. those are beeing saved as .mod files and importet to our floorplans as hotlinks.

as those projects are getting bigger and bigger, the number of appartment-types is rising and i try to find a smart solution to save those appartments as .mod to update our floorplan.


in Archicad we have "selection sets", where i can store a selection (my appartment) in one set. my idea is to store those selection sets with a python script as a .mod file so i don't have to click on every selection set und save it manually.


the problem is, that i cant find a way to use selection sets with python scripts. does anyone have an idea, how this could work?


thanks a lot in advance for any help


Noemi Balogh
Community Admin
Community Admin

Hi vr,

I'm afraid that currently this is not an available feature with our Python API. However, there is a possibility to order C++ add-ons from Python, which might give you a solution. 

I suggest to check out the documentation and manual:


Also, if you have specific questions, many developers can help you in the Developer forum.

Take care,

Noémi Balogh

Community Expert, Admin


Hi Noémi,


thanks for your help. I think it would be a great fueature to work with selection sets in future Python API updates.


I'll look into to your links, but i don't have any experiance in C++. So i'll seek some help in the Developer forum as well.


Have a nice day and thanks!


Erwin Edel

Any reason why you aren't using the following method:


1. create a layer called (for example) 'module boundary'

2. set up a layer combination for module saving (for example called 'mod export') which includes all the layers you want to save to your module files and the boundar layer you just created

3. save a view of the floor plan with your module work space using this layer combination

4. on you boundary layer draw a poly line around your module, I would also add a little text box below it with the name of the module file

5. when you've made change, simply use the marquee tool and by pressing spacebar and selecting the poly line you will have everything selected for your save


This is a slimmed down basic version of our method of working with modules in projects. No scripting etc needed and fool proof.

Erwin Edel, Project Lead, Leloup Architecten

Windows 10 Pro
Adobe Design Premium CS5

Hi Erwin,


almost excatly is your "workaround" the way some of my colleagues are working. but when you have to update 40/50 modules it just takes some time. It would be so much faster if someone could do it just by running a script instead of klicking about 7 times for each module.


But thanks anyways=)



Nested modules for repeating elements within the appartments themselves might cut down on time needed to save each individual module. For example bathroom or toilet 'units'. If these change, you only need to change the one module for bathroom and it will update in all apartments that use this bathroom setup module.


I must admit we rarely have more than 10 different appartment types.


Planning and setting up module structures/trees for these kind of projects are time consuming, but when done well will save a lot of time over the course of a project.

Erwin Edel, Project Lead, Leloup Architecten

Windows 10 Pro
Adobe Design Premium CS5

this is a good idea and we are doing this as far as we can. but our evaluations (hopefully is this the correct term in english since we are using Archicad in german) need to have every appartmenttype as a seperate module. so if we nest for example our bathrooms, we need then to update all our appartments with this bathroom.mod in it to update our plan. this saves us some drawing time but sadly does not help with saving time with saving those .mod files.

If you have a nested module, you do not need to 're-save' all your modules, you just need to update them after you changed the bathroom.


This of course still takes a bit of time, but saving all the individual appartment modules for the same change across all of them takes more time.


Of course modular design where all bathrooms are the same is not always an option!


I find the best moment to start planning out a module 'diagram' to be after schematic design is finished. Before this stage it is hard and sometimes limiting in your design to pin yourself down with modules. We used to start early with modules in design repeats, but as you keep evolving the design, your modules will degrade in to a mess without logic.


So basically, once your schematic design is set, analyse the plan and look for repeating elements and divide in to small parts where possible, so you can benefit from nested elements.

Erwin Edel, Project Lead, Leloup Architecten

Windows 10 Pro
Adobe Design Premium CS5

Make schedule of selection set elements and as a field use Internal ID. Then save it as csv and use in python script as list of GUIDs to collect elements 

Learn and get certified!