Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FamilyInstance.UsesInstanceGeometry depreciated but not documented anywhere?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
thomas
438 Views, 5 Replies

FamilyInstance.UsesInstanceGeometry depreciated but not documented anywhere?

I've found an oddity which a trusted Google search fails to return any results nor does checking "whats new" in newer releases of the Revit API. 

 

I am building an app on the Revit 2017 API and require the FamilyInstance.UsesInstanceGeometry.

 

However, if I compile on the 2019 API I notice this property is no longer there and has been moved to the RevitAPIIFC.dll which means referencing another library. 

 

Why was this not marked as depreciated in newer versions and why is there no documentation about the change? 

 

Even RevitAPIDocs is confusing - see below, it shows an Exporter class in the IFC namespace of the Revit API dll which doesn't exist when I browse via Visual Studios Object Browser. 

 

Whats going on? 

Capture.PNG

 

5 REPLIES 5
Message 2 of 6
thomas
in reply to: thomas

Next oddity; UseInstanceGeometry() (not to be confused with UsesInstanceGeometry()) has been removed completely in the newer versions of the API which surely renders the method which checks for this condition useless? Not unless a model is upgraded from older versions I suppose? 

Message 3 of 6
jeremytammik
in reply to: thomas

Dear Thomas,

 

Thank you for your query.

 

I searched for a FamilyInstance.UsesInstanceGeometry property in all the releases since Revit 2016 and was unable to find it.

 

What I do see, however, is the UsesInstanceGeometry method on the Autodesk.Revit.DB.IFC.ExporterIFCUtils utility class:

 

https://www.revitapidocs.com/2020/0c4dff47-2150-0615-9d65-7b8f9422861a.htm

 

> Identifies if the family instance has its own geometry, or uses the symbol's geometry with a transform.

 

Maybe you were confusing the two?

 

Maybe you added (and lost) your own extension method to the FamilyInstance class, making a call to the existing utility class method?

 

Anyway, thank you for pointing out this interesting method.

 

It seems like useful functionality to be aware of.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 6
thomas
in reply to: jeremytammik

Hi Jeremy

 

Thank you for your reply. 

 

That is even more peculiar re 2016. I definitely didn't get confused as this is what I see - and called - in the Revit 2017.0.0.0 API. Why does the FamilyInstance class have this method available (see screenshot below), yet all other versions (including 2017, have this method only in the RevitAPIIFC? 

Capture.PNG

 

As an aside to give some more insights into what I'm doing and why I need this method is for a ray-bounce algorithm I've written which basically traces outlines of any void space in a model on an imaginary plane by computing deflections of the ReferenceIntersector against Revit element faces as merging solids and extracting faces was too expensive and inferior in approach. I need to call this method for family instances such as beams as any family not using its own geometry (all by default if I am not mistaken) use the Symbol geometry (which is located at the file center regardless of where the instance is in coordinate space), and this result enables me to transform the ray deflection so I always get the expected result. Its quite  a cool (and complex) algorithm which also handles co-planar faces and all the pitfalls of Revit's inaccuracies. 

Message 5 of 6
jeremytammik
in reply to: thomas

Very weird.

 

However, as an experienced programmer, you will know from experience:

 

You can fight weirdness for hours, days, months and years, with great effort and to no avail.

 

It is much simpler to just do what works.

 

So why don't you just use the IFC utility class method, ignore and forget all the weird aspects?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 6 of 6
thomas
in reply to: jeremytammik

Alas, that is exactly what I did! My reasoning for raising this issue was more a case of what else is undocumented which Revit developers should be aware of - or whether I'm missing a more comprehensive list of changes which are published somewhere. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community