<?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: Accessing linked CAD geometry in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-linked-cad-geometry/m-p/5523561#M73726</link>
    <description>&lt;P&gt;Hi Gehry,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using the same project file and a model, just a version difference? &amp;nbsp;Here is some explanation in case it helps to clarify.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"&lt;STRONG&gt;GeometryInstance Class&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;DIV id="mainSection"&gt;
&lt;DIV id="mainBody"&gt;
&lt;DIV id="allHistory" class="saveHistory"&gt;
&lt;DIV id="remarksSection" class="section"&gt;&lt;EM&gt;A GeometryInstance represents a set of geometry stored by Revit in a default configuration, and then transformed into the proper location as a result of the properties of the element. The most common situation where GeometryInstances are encountered is in Family instances. Revit uses GeometryInstances to allow it to store a single copy of the geometry for a given family and reuse it in multiple instances. Note that not all Family instances will include GeometryInstances. When Revit needs to make a unique copy of the family geometry for a given instance (because of the effect of local joins, intersections, and other factors related to the instance placement) no GeometryInstance will be encountered; instead the Solid geometry will be found at the top level of the hierarchy. A GeometryInstance offers the ability to read its geometry through the GetSymbolGeometry() and&amp;nbsp;() methods. These methods return another Autodesk.Revit.DB.GeometryElement which can be parsed just like the first level return."&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class="section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="section"&gt;If you can attach a minimum project file (with only a problematic object, for example) and 2014 version of a model, together with ready-to-run, minimum sample MSVS project, we can try to take a look.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 27 Feb 2015 23:00:18 GMT</pubDate>
    <dc:creator>mikako_harada</dc:creator>
    <dc:date>2015-02-27T23:00:18Z</dc:date>
    <item>
      <title>Accessing linked CAD geometry</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-linked-cad-geometry/m-p/5517875#M73725</link>
      <description>&lt;P&gt;I am using a function to access the geometry of linked CAD files. Then function accepts an import instance as an argument and returns a list of geometry objects contained within the linked file. The function works great in Revit 2015 but I get an error in Revit 2014. It appears that the GetInstanceGeometry method does not return anything. I've tried using GetSymbolGeometry but that didn't work either. Any ideas why this works in 2015 but not in 2014? Here's the function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Function&lt;/SPAN&gt;&amp;nbsp;GetLinkedDWGCurves(curLink&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;ImportInstance)&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;List(&lt;SPAN&gt;Of&lt;/SPAN&gt;&amp;nbsp;Geometryobject)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'returns list of curves for linked DWG file&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&amp;nbsp;curveList&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;New&lt;/SPAN&gt;&amp;nbsp;List(&lt;SPAN&gt;Of&lt;/SPAN&gt;&amp;nbsp;GeometryObject)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&amp;nbsp;curOptions&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;New&lt;/SPAN&gt;&amp;nbsp;Options&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&amp;nbsp;geoElement&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;GeometryElement&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&amp;nbsp;geoInstance&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;GeometryInstance&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'get geometry from current link&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geoElement = curLink.Geometry(curOptions)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;For&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;Each&lt;/SPAN&gt;&amp;nbsp;geoObject&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;GeometryObject&amp;nbsp;&lt;SPAN&gt;In&lt;/SPAN&gt;&amp;nbsp;geoElement&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'convert geoObject to geometry instance&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geoInstance =&amp;nbsp;&lt;SPAN&gt;DirectCast&lt;/SPAN&gt;(geoObject, GeometryInstance)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'loop through geometry objects in the geometry instance&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;For&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;Each&lt;/SPAN&gt;&amp;nbsp;curObj&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt;&amp;nbsp;GeometryObject&amp;nbsp;&lt;SPAN&gt;In&lt;/SPAN&gt;&amp;nbsp;geoInstance.GetInstanceGeometry()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'add object to list&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;curveList.Add(curObj)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'return list of geometry&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Return&lt;/SPAN&gt;&amp;nbsp;curveList&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;End&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2015 05:57:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-linked-cad-geometry/m-p/5517875#M73725</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-24T05:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing linked CAD geometry</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/accessing-linked-cad-geometry/m-p/5523561#M73726</link>
      <description>&lt;P&gt;Hi Gehry,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using the same project file and a model, just a version difference? &amp;nbsp;Here is some explanation in case it helps to clarify.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"&lt;STRONG&gt;GeometryInstance Class&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;DIV id="mainSection"&gt;
&lt;DIV id="mainBody"&gt;
&lt;DIV id="allHistory" class="saveHistory"&gt;
&lt;DIV id="remarksSection" class="section"&gt;&lt;EM&gt;A GeometryInstance represents a set of geometry stored by Revit in a default configuration, and then transformed into the proper location as a result of the properties of the element. The most common situation where GeometryInstances are encountered is in Family instances. Revit uses GeometryInstances to allow it to store a single copy of the geometry for a given family and reuse it in multiple instances. Note that not all Family instances will include GeometryInstances. When Revit needs to make a unique copy of the family geometry for a given instance (because of the effect of local joins, intersections, and other factors related to the instance placement) no GeometryInstance will be encountered; instead the Solid geometry will be found at the top level of the hierarchy. A GeometryInstance offers the ability to read its geometry through the GetSymbolGeometry() and&amp;nbsp;() methods. These methods return another Autodesk.Revit.DB.GeometryElement which can be parsed just like the first level return."&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class="section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="section"&gt;If you can attach a minimum project file (with only a problematic object, for example) and 2014 version of a model, together with ready-to-run, minimum sample MSVS project, we can try to take a look.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Feb 2015 23:00:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/accessing-linked-cad-geometry/m-p/5523561#M73726</guid>
      <dc:creator>mikako_harada</dc:creator>
      <dc:date>2015-02-27T23:00:18Z</dc:date>
    </item>
  </channel>
</rss>

