Post Code: Easier than an Explanation
[quote user="Michal Kurzewski"]I got If for .IsCellElement before .IsDimensionElement[/quote]
It's hard to explain code in a human language, but it's easy to read code. Post a code snippet that shows what you are doing, and let us interpret it!
Code Syntax Highlighting
When you post code, use the Forum advanced editor's syntax highlighting tool. That's the icon that resembles a pencil: