---
title: "getPreferredIconSize"
slug: "api/catalog/operations/getpreferrediconsize"
sidebar:
  order: 215
---

<a id="ref-6a1b3e9aa445"></a>
<a id="ref-8a9a143ed1fe"></a>
<a id="ref-830100e02f84"></a>

## Synopsis

```text
int getPreferredIconSize(SessionId sessionId)
throws CatalogServiceFault;
```

See also: [SessionId](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [CatalogServiceFault](/pCon/configuratorOnline/specs/api/catalog/faults/catalogservicefault#ref-f8dbfd6fd5d6)

The `getPreferredIconSize` operation returns the preferred icon size assumed by the Online Configurator. The operation returns zero if the preferred icon size has not been previously set by an successful invocation of the [`setPreferredIconSize`](/pCon/configuratorOnline/specs/api/catalog/operations/setpreferrediconsize) operation. Otherwise, the operation returns the value of the `size` argument from the last successful invocation of the `setPreferredIconSize` operation for the same session.

A [`CatalogServiceFault`](/pCon/configuratorOnline/specs/api/catalog/faults/catalogservicefault) is returned if any of the following conditions occurs:

- The `sessionId` parameter is not a valid string representation of an UUID or does not represent an open session.
