- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone;
I am working thru some sample code that is meant to get the geometry from an Autocad import instance and I have a question about the get_Geometry call shown below:
Reference r = uidoc.Selection.PickObject(
ObjectType.Element,
new JtElementsOfClassSelectionFilter<ImportInstance>() );
var import = doc.GetElement( r ) as ImportInstance;
// Get Geometry
var ge = import.get_Geometry( new Options() );
foreach( var go in ge )
{
if( go is GeometryInstance )
{
var gi = go as GeometryInstance;
var ge2 = gi.GetInstanceGeometry();
if( ge2 != null )
Retrieve Visible dwg geometry Link
My understanding is that the code gets an ImportInstance and the calls get_Geometry to get the geometry. However, when I look at the Revit API docs for this object I see only a Geometry property but not a get_Geometry property or method. Shouldn't the code call the Geometry property since that is what the API says is available? What am I missing? (I am trying to convert the code to Python.) ( Revit API link )
Also when I am working in the Revit Pyhon Shell app, the autocomplete shows that the Geometry property is available for use but not get_Geometry. If I try to use the Geometry property I get an error but if I try get_Geometry things work. So why is get_Geometry not listed? And why does Geometry returns an error? (TypeError: indexer# is not callable).
Sincerely;
Michelle
Solved! Go to Solution.

Developer Advocacy and Support +