<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Surface area of Face is wrong. in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359871#M78969</link>
    <description>&lt;P&gt;I am just a newby, but I would have my add-in ask the user the first time wich units he wants en let your add-in convert the results for metric. I would also build a command or button to change the various settings.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2013 18:12:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-08T18:12:54Z</dc:date>
    <item>
      <title>Surface area of Face is wrong.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359275#M78965</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have written this fuzzy testcode, trying to extract the geometry of the glass in an Windowelement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The dimensions of the Glass are 1170 x 1180, so the area i am looking for is around 1 m2. I get 12 m2. When i look at the family the dimensions are identical. &lt;SPAN&gt;Its in the basis sample project.&lt;/SPAN&gt;&amp;nbsp;I don't get it, can someone please enlighten me?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second question. Why isn't there just a collection extracted from the object model containing all the solids in the model, with their material and geometry? Everybody who want's &amp;nbsp;to do some analysis on the building needs that info. From what i'm reading i have to transform nested familyinstances???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;		public void Testing()
		{
			Document doc = Document;
			String str = "";
			Options opts = Application.Application.Create.NewGeometryOptions();

			IList&amp;lt;Element&amp;gt; elems = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Windows).ToElements();
			
			foreach (Element e in elems)
			{
				if (e.Name =="1180 x 1170mm")
				{
				str += e.Name + "\n";
				
					GeometryElement geoElement = e.get_Geometry(opts); 
					
				   // Get geometry object van het element.
				   foreach (GeometryObject geoObject in geoElement)  
				   {  
				      // Get the geometry instance which contains the geometry information  
				      GeometryInstance instance = geoObject as GeometryInstance;  
				      if (null != instance)  
				      {  
				      	 
				      	GeometryElement i = instance.GetInstanceGeometry();
					
				         foreach (GeometryObject o in i)  
				         {  
				        
				            Solid s = o as Solid;  
    							if (null != s &amp;amp;&amp;amp; 0 &amp;lt; s.Edges.Size)
					                {
					                		
					    				foreach(Face f in s.Faces)
					                	{
					    					
					                		Element m = doc.GetElement(f.MaterialElementId) as Element;
					                		
					                		if (null != m)
					                		{
						                		if (m.Name == "Glass")
						                		{
						                			

						                				str += f.Area + "\n";

						                		}
					                		}
					                	}
					                }
				         }  
				      }  
				   }
				}
				
				
			}
			
			TaskDialog.Show("test",str);
		}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 13:18:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359275#M78965</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-08T13:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Surface area of Face is wrong.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359466#M78966</link>
      <description>&lt;P&gt;Revit's internal distance units are always in feet, so the area you're retrieving is in square feet.&lt;/P&gt;&lt;P&gt;Always be careful about units when you're using the API - distances are always in feet but I believe all other units are in SI.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 15:05:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359466#M78966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-08T15:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Surface area of Face is wrong.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359805#M78967</link>
      <description>&lt;P&gt;Many Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Revit Api is clearly not written to be used by other people or to be practical.&lt;/P&gt;&lt;P&gt;The position of an element is a property, not an object from een instance, from an object form a nested transformed instance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, i am a little frustrated. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 17:34:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359805#M78967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-08T17:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Surface area of Face is wrong.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359813#M78968</link>
      <description>&lt;P&gt;I have an add-in that accepts coordinate points and are placed around the model. I (being in the US) have expeted results because distances between points are accurate and are measured in FT. However, any other country that uses my addin always gives negative feedback because the distances are incorrect between points when measured. I always have to explain to them that Revit does that on it's own; It is not overrideable.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 17:38:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359813#M78968</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-08T17:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Surface area of Face is wrong.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359871#M78969</link>
      <description>&lt;P&gt;I am just a newby, but I would have my add-in ask the user the first time wich units he wants en let your add-in convert the results for metric. I would also build a command or button to change the various settings.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 18:12:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/surface-area-of-face-is-wrong/m-p/4359871#M78969</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-08T18:12:54Z</dc:date>
    </item>
  </channel>
</rss>

