GRAPHISOFT®

Python APIVersion: 0.23 Beta

ApplyFavorite

Applies the given favorite to the specified element.

def ApplyFavorite (favoriteName, elemGuid) -> String

 

Parameters

favoriteName
[in] Name of an existing favorite.
elemGuid
[in] Identifier of an existing element instance.

 

Return Values

This function returns the GUID of the modified element.

 

Remarks

This function is a wrapper of the following C++ API functions:

 

Example

wallFavoriteList = GetFavorites(API_WallID)

if len(wallFavoriteList) == 0:
    sys.exit("There isn't any wall favorite!")

walls = GetElementList(API_WallID)
lastWallFavorite = wallFavoriteList[-1]

with UndoScope ("Apply Favorite"):
    for w in walls:
        ApplyFavorite(lastWallFavorite, w)

 

Requirements

Version: Python API 0.2 or Later
Module: GS

 

See Also

GetFavorites

All functions