Get property of a parent class?

Get property of a parent class?

CEdwardsUN5MX
Advocate Advocate
206 Views
1 Reply
Message 1 of 2

Get property of a parent class?

CEdwardsUN5MX
Advocate
Advocate

I'm trying to figure out, with no success, how to get the Location property of a Coordination Model in Python.

 

The class is DirectShape, which is a child class of Element Class that does have a location property, but I've no idea how to get the property that should be inherited from it.

 

Can someone give me an idea how this is done?

 

 

0 Likes
Accepted solutions (1)
207 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni
Accepted solution

You could cast the DirectShape to an Element object and query its Location property. However, I doubt that will be of any use, since it is probably not populated at all, and hence will return null. Afaik, the only location information you can retrieve from a direct shape is via its geometry, e.g., vertices etc.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes