If you add a mode with the attribute “no-modeling” to a model type, then this mode will not be shown in View→Mode menu in the ADOxx Modelling Toolkit. Therefore it is not possible to manually switch a model of the specified model type to the “no-modeling” mode. To my knowledge it is also not possible to switch a model to a “no-modeling” modi using AdoScript. However, as your purpose is to “Create a model where modelling is not possible” then you can f.e. do the following: Write an AdoScript code to create your model and then to open it “write-protected”. Here you have a short example code:
1CC "CoreUI" MODEL_SELECT_BOX mgroup-sel without-models
2#--> RESULT ecode:intValue mgroupids:idList
3
4CC "Core" CREATE_MODEL modeltype: ("Sample")
5 modelname: ("TestModel22")
6 version: ("0.1")
7 mgroups: (mgroupids)
8
9#--> RESULT ecode:intValue modelid:id threadid:id refids:strValue
10
11CC "Core" DISCARD_MODEL modelid: (modelid)
12CC "Modeling" OPEN modelids: (STR modelid) write-protected
In the above code a new model of a specified model type is created within a selected model group. Next, the created model is opened “write-protected”, which disables changes in the model.