add_objects()
Adds objects to a portfolio. With replace=True the portfolio is cleared first, making the
given objects its complete new content.
1. Signature
-
Sync
-
Async
ecm.portfolio.add_objects(portfolio: ECMPortfolio | int,
objects: Iterable[ECMPortfolioObjectLike],
*, replace: bool = False) -> None
await ecm.portfolio.add_objects(...) -> None
2. Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
— |
The portfolio or its numeric ID. |
|
|
— |
The objects to add: |
|
|
|
|
| When the portfolio is restricted to an object type, the server rejects members of other types. |
3. Example
doc = ecm.dms.get(Unittest_DMS_Document, 83)
ecm.portfolio.add_objects(portfolio, [doc]) # extend
ecm.portfolio.add_objects(portfolio, [doc], replace=True) # replace
4. Related pages
-
remove_objects() — remove individual objects
-
clear_objects() — remove all objects