Tran,
This is getting out of hand. You have pestered not one but two online help communities. Nobody is willing to help you because you're constantly asking for a complete solution for things that are either thoroughly detailed or have been discussed and solved ad infinitum.
If you are facing specific problems, describe them in detail and we'd try to help you solve them. Otherwise, do your research!
Do not expect to be spoon fed every single time. If you want to work with the Revit API, please download the Revit SDK documentation and refer to it before posting any API questions online.
If you had checked the API, you would have already found out everything you need to know. You would have also found out that "Convert()" is not a valid API method but an internal Dynamo call.
First of all, your code is failing because you're trying to use an internal method without referencing its library. Also this is a completely unnecessarily step because it would bring you out of the context of the Revit API.
Secondly, even a google search would have given you more than enough information on how to extract an element's geometry:
http://bfy.tw/4cZXThe first link covers in great detail how to extract the geometry of a family instance(beam):
http://help.autodesk.com/view/RVT/2016/ENU/?guid=GUID-F092BCCC-77E9-4DA9-9264-10F0DB354BF5and the second that of a system instance (wall):
https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/Revit-API/files/GUID-96A0E5EC-D9AD-42F2-901D-CC902ADD0BED-htm.htmlIf you're still having difficulties after reviewing all of the above, here's
another short summary:
- create a geometry options instance
- fetch the geometry element collection with element.get_Geometry(your options instance)
- iterate through the collection and test the object's type to filter out the solids
- if the element is a family instance, first extract the instance's geometry element with a method like "g.GetInstanceGeometry()" and then repeat the original iteration to get the solids
You
can ask us about specifics on any of the above steps, but please
do not ask us to do all your work for you!Regards,
Dimitar