Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Adapps lango switcher macro
Table of Contents
minLevel1
maxLevel7

Description

The use of macros in Chouette allows the association of a value to a given field. So the user can, through the macro sets, create or associate a value to a field automatically (without going through manual editing). Macro lists are set in a workbench.

Consult macro lists

You can view the macro lists created by your organization organisation in “Workbench” - “Macro Lists”.

...

The star wheel on each line allows you to edit, consult, delete or execute the macro list.

...

Creation of a Macro List

Add a new macro

By clicking on “Add a Macro List”, you access the editing form for a new macro list.

...

Whatever instruction you select, you will always be able to add a description of the macro objective and to add a comment:

...

Add a context into a Macro List

You also have the option to add a context to your Macro List.

...

If your macro list contains several macros, the star wheel will suggest you to organize the order of the macros in the list. So the macros in first position will be executed first, and so on.

...

Execute a Macro List

After creating your Macro List, you can execute it. Go to Macro List section and select “Execute this report” on the star wheel.

...

On the section “Macros”, you will find a message and a link for each resource processed by the macro with its criticality (success, warning, or error).

Type of Macros

Create a code

With the instruction “Create a code”, the user can create a code on the selected model (stop areas, lines, or vehicle journeys) from the value of another attribute (on another code in the same model or another attribute in the model).

...

  • The target model: stop areas, lines, or vehicle journeys

  • The attribute or code that is used as source, i.e. from which the new code will be created.

  • The source pattern, when the value of the source code or attribute is used in part.

  • The target code space where the new code will be created.

  • The target pattern, when the source code or attribute must be modified to generate the new code

...

Associate shapes according stop areas

The user can add the “Associate Shapes” Shapes according stop areas” macro to the list.

Before executing this macro, you must make sure that you have imported or created shapes into Chouette.

...

When the macro is executed, a trail shape will be associated with a journey pattern when if :

  • The journey pattern does not yest have an associated shape yet

  • All stops in the journey pattern are geographically close to the coordinates of the shape

  • The length of the shape is a short as possible for the stops. If two shapes are similar, Chouette will take the shorter shape in relation to the stop areas.

Associate shapes according code

The user can add the “Associate Shapes according code” macro to the list.

Before executing this macro, you must make sure that you have imported or created shapes into Chouette.

...

...

When the macro is executed, a shape will be associated with a journey pattern if :

  • The journey pattern does not have an associated shape yet

  • The shape code value is equal to the journey pattern name

Define Stop Areas compass bearing from Shapes

The user can add the Macro “Define Stop Areas compass bearing from Shapes”.

...

When executing the instruction, you must choose a data set as the target. Only stops in this data set will be considered by the macro.

...

Create Referent Stop Area

The user can use the macro “Create Referent Stop Area” to automatically create referring stops when there are two or more stops with very close coordinates and compass bearing. The tolerance is 15 m for position and 15 degrees (+/- 7,5°) on compass bearing.

...

If no target is selected, the macro will take into account all the stops in your referential.

Associate Stop Areas with a Referent

The user can use the “Associate Stop Areas with a Referent” macro to associate his stop areas with created referent stop areas that have close coordinates and compass bearing.

...

When executing this instruction, there is no need to choose a target. The macro will process all the stop areas owned by your organizationorganisation.

Define postal address

Users can use the "Define postal address" macro to define the city and zip code of an object.

...

These two attributes will be calculated according to the geographical coordinates and can be consulted in the stop areas referential:

...

Define Referent attribute from Particular value

The user can select the "Define Referent attribute from Particular value" macro to define a Referent attribute based on the attributes provided by the particular stop areas. The macro can be executed on stops or company.

...

  • If all the particulars in a given Referent provide the same value (ignoring Individuals with no value), this common value is used to define the Referent’s attribute.

  • If the attribute is already defined in the Referent's model, the current value is left unchanged by the instruction.

  • If the instruction set does not find a common value for Particulars, the Referent attribute remains unchanged.

Define Journey Pattern duration from passing time

The user can use the "Define Journey Pattern duration from passing time" macro to update the journey patterns based on the average duration between the arrival and departure times of the vehicle journeys.

...

When this instruction is executed, a dataset must be selected as the target. The calculation will be performed only on the missions in the target dataset.

Define Journey Pattern distances from Shapes

The user can use the "Define Journey Pattern distances from Shapes" macro to update journey pattern according to the distance provided by the associated shapes.

...

Delete all Vehicle Journeys

The user can use the "Delete all Vehicle Journeys" macro to clean up all the trips in a dataset.

...

When this instruction set is executed, a dataset must be specified as the target. All vehicle journeys on this target will then be automatically deleted.

Update attribute from Referent

The user can use the "Update attribute from Referent" macro to update the attributes of a particular stop area or company.

...