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: 

Finding Geometry Objects? (newbie question)

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Mendo123
1786 Views, 4 Replies

Finding Geometry Objects? (newbie question)

Hi,


Sorry If this has been asked and it might seem like a dumb question but I have very minimal/no experience with GeometryObjects in revit and most of my work has been based on filtering Elements.

 

I want to know if it is possible to Find geometry objects in the without prompting the user to select one?

 

can I use pickobject to select all or individual curves or lines to get all references programmaticaly?

 

Cheers

 

 

 

4 REPLIES 4
Message 2 of 5
jeremytammik
in reply to: Mendo123

Dear Mendo,

 

Good question.

 

The Revit database contains elements.

 

They are mainly defined parametrically.

 

This generates their geometry.

 

You can query an element for its geometry.

 

The geometry objects are therefore more or less a read-only view of the elements and their parameters.

 

Yes, you can retrieve geometry without prompting the user, e.g. traversing all elements or a subset via a filtered element collector and querying each for its geometry.

 

My most recent foray into this area was published today:

 

http://thebuildingcoder.typepad.com/blog/2015/09/directshape-from-face-and-sketch-plane-reuse.html

 

The Building Coder has discussed hundreds of other examples of geometry retrieval and analysis:

 

http://thebuildingcoder.typepad.com/blog/geometry

 

Some of the more interesting discussions are listed in various topic groups:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5

 

One related area is exporting element geometry in various ways.

 

The easiest way to do so nowadays is to use a custom exporter:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.1

 

That hooks directly into the graphics pipeline and eliminates the need to query each individual element for its geometry.

 

Cheers,

 

Jeremy



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

Message 3 of 5
rosalesduquej
in reply to: Mendo123

Hi Mendo,

 

Adding to what Jeremy posted, First of all let me tell you, there is no such thing as a dumb question :), so we are glad you posted it. 

Another good source I have found that helped me understand Geometry API comes from the Revit Help site. Here is the link for you to check it out. 

 

http://help.autodesk.com/view/RVT/2016/ENU/?guid=GUID-F429AAEC-551C-4E0D-9CE0-6F92A5A68CC3

 

Hope this helps you out 🙂 

 

 



Jaime Rosales D.
Sr. Developer Consultant
Twitter | AEC ADN DevBlog
Message 4 of 5

Dear Jaime,

 

Thank you for the additional helpful pointer.

 

I published a summary of these suggestions on The Building Coder:

 

http://thebuildingcoder.typepad.com/blog/2015/09/geometry-basics-and-no-modifying-linked-files.html#...

 

Cheers,

 

Jeremy



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

Message 5 of 5
Mendo123
in reply to: Mendo123

Thank you guys, you have been more then helpful. Very much appreciated.

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