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?
Solved! Go to Solution.
Solved by hisdirt. Go to Solution.
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
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?
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.NE
http://thebuildingcoder.typepad.com/blog/2008/09/g
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
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!