Catching Column Faces Problem

Catching Column Faces Problem

mm1452
Enthusiast Enthusiast
1,069 Views
3 Replies
Message 1 of 4

Catching Column Faces Problem

mm1452
Enthusiast
Enthusiast

Hi All,

 

I want to catch the column faces but the when running the below code, it sucsses to catch the faces of floors, foundation and beams but when select a structural column, it catch nothing because the task dialog dosen't appear.

 

            Element col = doc.GetElement(colRef);
            Options op = new Options();
            op.View = doc.ActiveView;
            op.ComputeReferences = true;
            GeometryElement geoELem = col.get_Geometry(op);
           
            foreach (GeometryObject obj in geoELem)
            {
                Solid solid = obj as Solid;
                if (null != solid)
                {
                    TaskDialog.Show("Tracing", solid.Faces.Size.ToString());
                }
            }
         
            return Result.Succeeded;

 

Thanks in advance.

0 Likes
Accepted solutions (1)
1,070 Views
3 Replies
Replies (3)
Message 2 of 4

jeremytammik
Autodesk
Autodesk
Accepted solution

This is because the elements that it works on are not family instances. They have their geometry directly in the first level of the goemetry hierarchy.

 

A column is a family instance, so the geometry is nested one level deeper.

 

Please install RevitLookup and explore the structure using that.

 

Then you will understand.

 

Please never submit another question here without exploring the issue in RevitLookup first.

 

That will improve you understanding and save a lot of offort for the rest of the universe.

 

Thank you!

 

Best regards,

 

Jeremy



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

Message 3 of 4

mm1452
Enthusiast
Enthusiast

Dear Jeremy,

 

Thanks for your reply, but I need to clarify some points:

 

1) I have discovered the problem before you answered but the forums didn't allow me to delete the post.

 

2) In case I haven't discovered it, I have the right to ask according to Autodesk policy (Please see the attached snap).

 

3) If you see in your opinion the question doesn't deserve the answer, please don't answer me.

 

Sorry for the inconvenience.

 

Thanks.

0 Likes
Message 4 of 4

jeremytammik
Autodesk
Autodesk

Dear Mm1452,

 

Absolutely right. I agree with you on all points.

 

Sorry about not being able to delete a post once it has been submitted. I have run into that problem sometimes too, and regretted what I said  🙂

 

I also think there are no stupid questions, ever, only stupid answers. Maybe my answer verged on the latter  🙂

 

Thank you for clarifying!

 

Best regards,

 

Jeremy



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