Version: dev

remove_event

Stable function · Editing

Tier: stable · Kind: function · Topic: Editing

JuliaTypeScriptPythonRustGo
remove_eventremoveEventremove_event, remove_event_from_modelnot exportedRemoveEvent

Note: spelling differs from the §2 rule: python=remove_event_from_model (expected remove_event); multiple spellings exported by: python

Julia

remove_event(model::Model, description::String)
remove_event(model::Model, description::String) -> Model

Remove events whose description field equals description from a model.

Events carry no dedicated identifier in the ESM schema, so the description string is the only name-like field available and is used as the match key. Searches both continuous and discrete events. Throws EditError if no event matches.

Source

TypeScript

function removeEvent(model: Model, name: string): Model

Remove events from a model by name.

Remove-ALL semantics: EVERY event whose name matches is removed, not just the first. Containers are tried in order — if any continuous event matches, only continuous events are filtered; otherwise discrete events are filtered (a name present in both containers is removed only from continuous_events). If the filtered container ends up empty, its key is dropped per the module-wide drop-when-empty convention (see withCollection).

Parameters

  • model — Model to remove event(s) from
  • name — Event name to remove

Returns

New model with matching event(s) removed

Throws

  • EntityNotFoundError if no event with that name exists

Source

Python

Exported as remove_event and remove_event_from_model. Both names refer to the same operation.

remove_event

remove_event(model: Model, event_name: str, validate_after_edit: bool = True) -> EditResult

Remove an event from a model.

Source

remove_event_from_model

remove_event_from_model(model: Model, event_name: str, validate_after_edit: bool = True) -> EditResult

Deprecated alias for remove_event . Remove an event from a model.

Source

Rust

Rust does not export this function.

Go

func RemoveEvent(model Model, name string) (Model, error)

RemoveEvent returns a copy of model with every event named name removed.

Remove-ALL semantics: EVERY event whose name matches is removed, not just the first. Containers are tried in order — if any continuous event matches, only continuous events are filtered; otherwise discrete events are filtered, so a name present in both containers is removed only from ContinuousEvents.

Returns *EntityNotFoundError when no event carries that name.

Source · Go docs