add_layer_definition_on_top(stack_index : integer;definition : string)

Navigation:  User guide > OLE automation > Methods >

add_layer_definition_on_top(stack_index : integer;definition : string)

Previous pageReturn to chapter overviewNext page

A new layer is added on top of the current layer stack with index 'stack_index' in the list of layer stacks (stacks are counted 1, 2, 3, ...).

 

The new layer is specified by the string 'Definition'. The string may be composed by several terms, separated by tab characters. A tab character has the ASCII code 9 (In VisualBasic, for example, this is obtained by Chr(9)).

 

Possible layer definitions are

"Simple layer" + tab + string specifiying the material + tab + string specifying the thickness in cm(!) + tab + string specifying the partial wave superposition ("coherent" or "incoherent")

"Thin film" + tab + string specifiying the material + tab + string specifying the thickness in cm(!)

"Thick layer" + tab + string specifiying the material + tab + string specifying the thickness in cm(!)

"Variable thickness" + tab + string specifiying the material + tab + string specifying the thickness in cm(!) + tab + string specifying the thickness variation in cm (!) + tab + string specifying the thickness profile ("1" rectangular, "2" Gaussian)

"Rough interface" + tab + string specifying the roughness formula + tab + string specifying the value of the c1 parameter + tab + string specifying the value of the c2 parameter

'End superlattice' (no parameter)

'Begin superlattice'+tab+'10' (the last partial string specifies the number of repetitions of the superlattice)

Starting with object generation 3.81: "Anisotropic layer" + tab + string specifiying the material to be used for the x-y-plane + tab + string specifiying the material to be used for the z-plane + tab + string specifying the thickness in cm(!) + tab + string specifying the partial wave superposition ("coherent" or "incoherent")

 

VisualBasic examples:

The VisualBasic code

 

  wcd.clear_fit_parameters

  wcd.clear_layer_stack (1)

  wcd.clear_material_list

  Call wcd.add_layer_definition_on_top(1, "End superlattice")

  Call wcd.add_layer_definition_on_top(1, "Simple layer" + Chr(9) + "Si3N4" + Chr(9) + "0.0002" + Chr(9) + "coherent")

  Call wcd.add_layer_definition_on_top(1, "Thin film" + Chr(9) + "Ag (JC)" + Chr(9) + "0.000001")

  Call wcd.add_layer_definition_on_top(1, "Begin superlattice" + Chr(9) + "10")

  Call wcd.add_layer_definition_on_top(1, "Thick layer" + Chr(9) + "Si3N4" + Chr(9) + "0.2")

  Call wcd.add_layer_definition_on_top(1, "Rough interface" + Chr(9) + "c1*EXP(-X*X/C2/C2)" + Chr(9) + "0.93" + Chr(9) + "45000.0")

  wcd.update_data

  wcd.update_plot

 

creates the following layer stack:

 

ole_layer_stack

 

Here is an VB example for the 'Variable thickness' layer type:

  Call wcd.add_layer_definition_on_top(1, "Variable thickness" + Chr(9) + "Si3N4" + Chr(9) + "0.0006" + Chr(9) + "0.00004" + Chr(9) + "2")

 

The following is an example for adding an anisotropic layer to the stack:

  Call wcd.add_layer_definition_on_top(1, "Anisotropic layer" + Chr(9) + "material_x_y" + Chr(9) + "material_z" + Chr(9) + "0.000003" + Chr(9) + "coherent")