====== ID ====== The ID of a block consists of the [[Name|name]] of the [[Block|block]] and the ID of its [[Parent_sub-system|parent sub-system]]. For example, with a hierarchy where the [[Sub-system|sub-system]] //France// contains the sub-system //Paris// which in turn contains the [[Expression|expression]] //Price// their ID’s are: ^Type ^Name ^ID ^ |Sub-system|France|France | |Sub-system|Paris |France.Paris | |Parameter |Price |France.Paris.Price| The ID of a block must be **unique** in the project. ==== Using ID's in equations ==== Because only the ID of a block must be unique, the model may contain several blocks with the same [[Name|name]], as long as they are put in different [[Sub-system|sub-systems]]. When referencing a [[Block|block]] in an equation by [[Name|name]], Ecolego first looks in the sub-system of the block whose equation you edit. If it there is no block with that name in the sub-system, the [[parent_sub-system#Root sub-system|root sub-system]] is searched. If no block is found there either, an error message is presented. If you want to explicitly reference a block in another sub-system you must use the ID of the block. For instance, using the hierarchy above, if you want to create an [[Expression|expression]] in the sub-system //France// which uses the parameter //Price//, you must write the full ID of the parameter: ''%%TotalPrice = France.Paris.Price + France.Orleans.Price + ... %%'' ===== See also ===== * [[Parent_sub-system|Parent sub-system and Root sub-system]] * [[Name|Name]] * [[Sub-system|Sub-system]] * [[Naming_conventions|Naming conventions]]