## UseAttributesIndex(string, string, bool) {#useattributesindex_1}

Carica l'indice degli attributi per velocizzare il filtraggio in base al valore degli attributi nei metodi di filtro come[`WhereGreater`](../../featuressequence/wheregreater/). Se l'indice non esiste, lo crea prima. Utilizzo*forceRebuild* per forzare la ricreazione dell'indice.

```csharp
public void UseAttributesIndex(string indexPath, string attributeName, bool forceRebuild = false)
```

| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| indexPath | String | Percorso del file indice. |
| attributeName | String | Nome dell'attributo su cui costruire l'indice. |
| forceRebuild | Boolean | Indica se ricreare l'indice anche se esiste già. |

### Eccezioni

| eccezione | condizione |
| --- | --- |
| ArgumentNullException | L'argomento è`null`. |
| ArgumentException | L'attributo con tale nome non esiste nel layer. |
| IOException | Si è verificato un errore di I/O. |
| InvalidOperationException | Indice per l'attributo specificato già caricato per questo layer. |
| [GisException](../../gisexception/) | Il file esiste e non è un file di indice degli attributi creato da Aspose.GIS. |

### Guarda anche

* class [VectorLayer](../)
* spazio dei nomi [Aspose.Gis](../../vectorlayer/)
* assemblea [Aspose.GIS](../../../)

---

## UseAttributesIndex(AbstractPath, string, bool) {#useattributesindex}

Carica l'indice degli attributi per velocizzare il filtraggio in base al valore degli attributi nei metodi di filtro come[`WhereGreater`](../../featuressequence/wheregreater/). Se l'indice non esiste, lo crea prima. Utilizzo*forceRebuild* per forzare la ricreazione dell'indice.

```csharp
public virtual void UseAttributesIndex(AbstractPath indexPath, string attributeName, 
    bool forceRebuild = false)
```

| Parametro | Tipo | Descrizione |
| --- | --- | --- |
| indexPath | AbstractPath | Percorso del file indice. |
| attributeName | String | Nome dell'attributo su cui costruire l'indice. |
| forceRebuild | Boolean | Indica se ricreare l'indice anche se esiste già. |

### Eccezioni

| eccezione | condizione |
| --- | --- |
| ArgumentNullException | L'argomento è`null`. |
| ArgumentException | L'attributo con tale nome non esiste nel layer. |
| IOException | Si è verificato un errore di I/O. |
| InvalidOperationException | Indice per l'attributo specificato già caricato per questo layer. |
| [GisException](../../gisexception/) | Il file esiste e non è un file di indice degli attributi creato da Aspose.GIS. |

### Guarda anche

* class [AbstractPath](../../abstractpath/)
* class [VectorLayer](../)
* spazio dei nomi [Aspose.Gis](../../vectorlayer/)
* assemblea [Aspose.GIS](../../../)


