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: 

getsymbolgeometry() returns blank after family is cut

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
hisdirt
556 Views, 4 Replies

getsymbolgeometry() returns blank after family is cut

Hi everyone, the subject says it all!

 

Im trying to manipulate beam families, but once a placed family instance is modified by other (joining beam, cutting void) - getSymbolGeometry() returns a GeometryElement rather than a GeometryObject


Any ideas?

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

Dear Hisdirt,

 

I would suggest looking at the Revit SDK ElementViewer sample:

 

Revit/2015/SDK/Samples/Viewers/ElementViewer/VB.NET

 

http://thebuildingcoder.typepad.com/blog/2008/09/geometry-viewer.html

 

It expects you to select an element before launching the command and then displays the element geometry in a .NET form.

 

It shows you exactly how to traverse the geometry objects and extract the edges to display.

 

Alternatively, or in addition to this, you can use the RevitLookup database exploration tool to interactively navigate through the element geometry and determine the path you need to take.

 

http://thebuildingcoder.typepad.com/blog/2014/04/revitlookup-for-ur1-adn-aec-and-au-news.html#7

 

I hope this helps.

 

Cheers,

 

Jeremy



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

Message 3 of 5
hisdirt
in reply to: jeremytammik

Thanks for the quick reply Jeremy!

 

Thanks for the advice too, using Snoop to hone in has been helpfull. Ive managed to recreate the steps Ive been making with the code to the same dead end.

 

- On one beam familyInstance, symbolGeometry has a list of solids which was what I expected

- On the other familyInstance (which has a family cutting it), the symbolGeometry is blank - refer attached screenshot

 

Have tried getting originalGeometry, but this contains solids only - no link back to the symbolGeometry. Essentially Im wanting to host a family on the top face of the beam, hence wanting symbolGeometry rather than instanceGeometry. Is there a better way of doing this?

Message 4 of 5
jeremytammik
in reply to: hisdirt

Dear Hisdirt,

 

Congratulations on reproducing those steps in RevitLookup.

 

I am glad you found it helpful.

 

Well, if that leads to the same dead end, then the next step would be to find an alternative route that does not.

 

The Revit SDK ElementViewer sample will certainly display the beam geometry:

 

Revit/2015/SDK/Samples/Viewers/ElementViewer/VB.NET

 

http://thebuildingcoder.typepad.com/blog/2008/09/geometry-viewer.html

 

Select the beam before launching the command and debug through the steps it takes to display its geometry in a .NET form.

 

It will show you exactly how to traverse the geometry objects and extract the edges to display.

 

I hope this helps.

 

Cheers,

 

Jeremy

 



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

Message 5 of 5
hisdirt
in reply to: jeremytammik

Hmmmm I gave that a go but it was still returning me instanceGeometry - I still couldnt get the symbolGeometry...

 

So I followed your advice to try and find the alternative route that did not and hey presto - after finding the desired face in the instance geometry, getting the face.Refernece provided a suitable host for my face based family. Success!

 

Thanks heaps for your help Jeremy!

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