Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66664

non valid parts from wall

$
0
0

Hi everyone,


I'm trying to get the true Area from wall parts.
I've done it dividing the parts' volume by their height and assigning it to a new Shared parameter.
The problem is that Revit still reading "non valid parts" (original parts from dividing parts).

Is there a way to identify the original parts to exclude them?

 

 // Get parts surface
        foreach (Element el in docCollector)

        {
            Parameter exclusion = el.LookupParameter("Exclusion");
            int elexclusion = exclusion.AsInteger();

            if (elexclusion == 0)
            {
                Parameter volume = el.LookupParameter("Volume");
                double elVolume = volume.AsDouble();

                Parameter hauteur = el.LookupParameter("Hauteur");
                double elHauteur = hauteur.AsDouble();

                double elArea = elVolume / elHauteur;

                Parameter PPArea = el.LookupParameter("PP_Elements_SURFACE");
                PPArea.Set(elArea);
            }
            if (elexclusion == 1)
            {
                Parameter PPArea = el.LookupParameter("PP_Elements_SURFACE");
                PPArea.Set(0);
            }
        }

Viewing all articles
Browse latest Browse all 66664

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>