# 如何获取属性类型信息？

 1. [FAQ](/cn/faq)
2. »
3.

目前唯一的方法是按照以下方式进行类型转换：

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">OdArray<OdDAI::AttributePtr>::iterator nextAttribute = leftEntityAttributeFilter.begin();</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">    for (; nextAttribute != leftEntityAttributeFilter.end(); ++nextAttribute)</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">    {</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">      OdDAI::AttributePtr pAttrib = *nextAttribute;</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">      OdDAI::InverseAttributePtr pInverse = OdDAI::InverseAttribute::cast(pAttrib);</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">      if (!pInverse.isNull())</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">      {</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">        odPrintConsoleString(L"\nInverse attribute `%s` (%lu)", pInverse->name().c_str(), (OdUInt64)leftIterator->id().getHandle());</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">      }</span>
```

```
<span lang="EN-US" style="background-color:white;color:#212529;font-family:Consolas;font-size:10pt;">    }</span>
```
