Hello,
To go into a bit more detail, in EA's API a Package is not a subtype of Element. Casting between them won't do you any good. EA's API is not designed from the UML metamodel, and thank Christ for that.
In EA, each UML package is represented by both an EA.Package (and has a row in the t_package table),
and an EA.Element (with a row in t_object).
EXCEPT project root nodes. A root node is represented only by an EA.Package, there is no corresponding EA.Element.
You can verify this by creating a new empty project and issuing the following SQL queries:
select * from t_package
select * from t_object
The first will return a single package named 'Model' with Package_ID 1 and Parent_ID 0.
The second won't return any results at all.
Then, create a package ("view") inside the project root and issue the queries again. There'll now be two t_package rows, and one t_object row with Object_Type 'Package'.
THAT stuff isn't in the manual.

/Uffe