I have defined two parameters, Length and Layer where Layer is a string. The default layer is called L1_C1.
In your cell, there is only one cell parameter defined for the length. There is no parameter for the drawing layer. At the moment, the polygon is drawn on layer 237 (ads_annotate).
How can I now get this MS-line to be drawn on the layer as indicated by the user.
One simple way to make the drawing layer selectable by the user is to create an integer parameter (layer number) and then use that parameter in the AEL drawing code. Have a look at cell1/layout/artwork.ael. That code is very difficult to read because it was generated by graphical cell compiler, but you can see a variable assignment:
Code:
m_438F812 = db_layerid(237, -1);
and many lines below the actual layer selection command
Code:
db_set_entry_layerid(context, m_438F812);
Here, you want to use your layer number instead of the hard coded layer 237.
Now, instead of selecting the layer by number, you can also pass a string and select the layer by name. Have a look at the online help where the AEL commands are listed: Design Tools > AEL > AEL functions by category. Look for the "Layer and LayerID" functions. The function that you need is db_find_layout_layerid_by_name()
In the component parameter box I'd also like that the possible layers were listed as choises.
This is possible by editing the file cell1>itemdef.ael where cell parameters are defined. If you want to hard-code the layer choices, that is quite easy using function create_form_set().
Also, you should consider switching to hand-written AEL for your layout, because the code from Graphical Cell Compiler isn't nice to modify/edit. It will be easier to start from scratch and code your artwork by hand, so that you have clean code with meaningful variable names. Hand written code will much shorter and cleaner than the complicated code from Graphical Cell Compiler.
For more detailed help, you should contact Agilent support. They also offer an AEL seminar in their Gent (Belgium) office which is exactly what you need for this type of ADS library development work.