EPLAN.EPLAN21.SELECTION

Contents

Description

This command allows an add-in to query the current selection of the Browser or the graphical editor. The handles of the selected objects are made available via an indexed parameter. An additional parameter indicates how many objects are contained in the selection.

The type of the objects can be determined via the eplGetType API function. This function returns the EplObjType for a handle.

Each selection is determined by the respective dialog from which the add-in has been started (main window, Browser, graphical editor). The graphical editor determines the selected instances as current selection if at least one instance has been selected. If nothing has been selected in the editor, the current page is determined as selection.

Parameters

All parameters have the prefix "EPL_PARAM_SELECTION_".

ParameterID Type Description
RESULT [OUT]
EplHandle

Handle of an iterator for all selected objects. For each handle within the iterator, the object type can be determined by using the the eplGetType function (EPL_OBJECTTYPE_PROJECT, EPL_OBJECTTYPE_PAGE, EPL_OBJECTTYPE_INSTANCE, etc.). An iterator contains objects of the same type.

As with any parameter of the EplHandle type, the caller is responsible for the release of the handle via eplCloseObject.

Error Messages

The eplExecuteCommand function returns EPL_OK if the selection could be determined.

Example

An example for querying the selection can be found under the EPLAN.EPLAN21.ADDIN.REGISTER command.

Reference