Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there any way to convert directshape to solid?
Solved! Go to Solution.
Is there any way to convert directshape to solid?
Solved! Go to Solution.
There is no Direct method to convert the direct shape to Solid. We can use Element.getGeometry(option) method.
though iteration process From GeometryElement to GeometryObject -->we can able to find the SOLID.
Please check the below Code for additional reference.
Options opt = new Options();
opt.ComputeReferences = true;
GeometryElement element = directShape.get_Geometry(opt);
Solid solid = null;
foreach (GeometryObject obj in element)
{
if (obj is Solid)
{
solid = obj as Solid;
}
}Hope This Helps!!!
Try to get DirectShape Element from outside the transaction by using its ElementId or Element Name.
Or Can you send me your code snippet?
So that i can check why null is returned.
Hi @CBSVN_V_QUYET
For this Case My Suggestion :),
Check with the Revit Lookup, After creating or selecting the DirectShape.
I also followed your suggestion but actually the result is mesh
If your problem is solved, Please accept it as a solution, In the future, it may be easy for other people facing same
problem.
Thank you so much... 🙂