Impossible for me to say what may be wrong in your case, if you don't post the relevant lines of the logbook:
[quote author=CVBA link=topic=2043.msg4626#msg4626 date=1397477098]
- Loading layout failed, see logging for details
[/quote]
If you look into the logbook (F6 if it's not visible), you should find one or more line, flagged as "error" or "warning" which should actually give some more details.
However, I can briefly explain how you should go about [b]creating a new control model[/b] (assuming that you'd be using one of the existing icons - so bypassing the complication of creating a new, ad-hoc, icon).
[list type=decimal]
[li]Duplicate one of the existing control models, e.g. PI_Saturation
- you could copy the "wwtp.base.controllers.pi_saturation.msl"
- store it (ideally) in a dedicated folder (for your own development): e.g. "AddOns" at the same level as the rootfile (wwtp.msl)
- rename it "wwtp.controllers.ABC.msl" (I would remove "base" from the file name)
[/li]
[li]Rename the CLASS appropriately - and preferably use the same ID for the filename and the class name.
In this case, e.g. "CLASS ABC"
[/li]
[li]Update the "sentinel" accordingly: something like
#ifndef WWTP_CONTROLLERS_ABC
#define WWTP_CONTROLLERS_ABC
[/li]
[li]Implement the model. Make sure you respect the syntax, avoid name duplication (i.e. OBJ with the same name, even if in different sections, are not allowed), use every interface variable (cannot define an interface OBJ and not use it in the equation section), ...
[/li]
[li]Add the appropriate #include statement, either
- in the "wwtp.base.controllers.msl": it will then appear in the treeview, with the other control models; or
- in the "wwtp.msl": it will appear as a branch of the rootfile, but it may be better to "isolate" your own development from the default libraries
[/li]
[li]Save the file(s)
- you may want to "Check Model Library", prior to saving
- no need to save or regenerate the BlockLib.xml in this case
[/li]
[li]Close and reopen your project: the new model should be available
[/li]
[/list]