remove_objects()

Removes the given objects from a portfolio. Only the assignment is deleted, the objects themselves stay in the DMS.

1. Signature

  • Sync

  • Async

ecm.portfolio.remove_objects(portfolio: ECMPortfolio | int,
                             objects: Iterable[ECMPortfolioObjectLike]) -> None
await ecm.portfolio.remove_objects(...) -> None

2. Parameters

Parameter Type Default Description

portfolio

ECMPortfolio | int

The portfolio or its numeric ID.

objects

Iterable

The objects to remove: ECMPortfolioObject, (id, type_id) pairs or model instances.

3. Example

portfolio = ecm.portfolio.get(42)
ecm.portfolio.remove_objects(portfolio, portfolio.objects[:1])