<?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: Insert KML files in InfraWorks Forum</title>
    <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636603#M14212</link>
    <description>&lt;P&gt;You can individually import the .DAE files to your model, or to your style palette as 3D models. Otherwise, this is an&amp;nbsp;&lt;U&gt;unsupported&lt;/U&gt; script that *may* be able to help you import the KML files. Let me know how this goes:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="bp-text bp-text-plain hljs"&gt;&lt;CODE class="js"&gt;&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; filePath = &lt;SPAN class="hljs-string"&gt;"C:\\\\Users\\username\\Downloads\\doc.kml"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; targetClassName = &lt;SPAN class="hljs-string"&gt;"BUILDINGS"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; city = app.ActiveModel;

&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; importKML = &lt;SPAN class="hljs-function"&gt;&lt;SPAN class="hljs-keyword"&gt;function&lt;/SPAN&gt; (&lt;SPAN class="hljs-params"&gt;city, kmlFile, targeClassName&lt;/SPAN&gt;) &lt;/SPAN&gt;{

    &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (!file.FileExists(kmlFile)) {
        printf(&lt;SPAN class="hljs-string"&gt;"Error: KML file not found: "&lt;/SPAN&gt; + kmlFile);
        &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt; &lt;SPAN class="hljs-literal"&gt;false&lt;/SPAN&gt;;
    }

    &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; providers = app.GetDataProviders(&lt;SPAN class="hljs-string"&gt;".kmz"&lt;/SPAN&gt;);
    &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; success = &lt;SPAN class="hljs-literal"&gt;true&lt;/SPAN&gt;;

    &lt;SPAN class="hljs-keyword"&gt;for&lt;/SPAN&gt; (p &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; providers) {

        &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; configs = providers[p].FileConnect(city, kmlFile);

        &lt;SPAN class="hljs-keyword"&gt;for&lt;/SPAN&gt; (c &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; configs) {

            &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; cfg = configs[c];
            cfg.TargetClassName = targetClassName;
            cfg.SourceCoordSys = &lt;SPAN class="hljs-string"&gt;"LL84"&lt;/SPAN&gt;;

            &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; result = cfg.Import();

            &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (result) {
                print(&lt;SPAN class="hljs-string"&gt;"INFO: KML Import success"&lt;/SPAN&gt;);
            } &lt;SPAN class="hljs-keyword"&gt;else&lt;/SPAN&gt; {
                print(&lt;SPAN class="hljs-string"&gt;"Error: KML Import Failed"&lt;/SPAN&gt;);
                success = &lt;SPAN class="hljs-literal"&gt;false&lt;/SPAN&gt;;
            }

        }
    }

    &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt; success;
};

importKML(city, filePath, targetClassName);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Dec 2017 21:49:11 GMT</pubDate>
    <dc:creator>elliott.rosenfeld</dc:creator>
    <dc:date>2017-12-19T21:49:11Z</dc:date>
    <item>
      <title>Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636404#M14211</link>
      <description>&lt;P&gt;I have been given a KMZ file that has several KML files in it which contain DAE files that I want to bring into Infraworks.&amp;nbsp; What is the workflow for this?&amp;nbsp; I’m trying to get away from having to place all the structures individually and rotate them to accurately to represent them in the real world.&amp;nbsp; Considering they’re already referenced in Latitude &amp;amp; Longitude there must be a way to convert that to drop right into my Infraworks model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for&amp;nbsp;any help on this.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 20:47:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636404#M14211</guid>
      <dc:creator>caseybek95</dc:creator>
      <dc:date>2017-12-19T20:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636603#M14212</link>
      <description>&lt;P&gt;You can individually import the .DAE files to your model, or to your style palette as 3D models. Otherwise, this is an&amp;nbsp;&lt;U&gt;unsupported&lt;/U&gt; script that *may* be able to help you import the KML files. Let me know how this goes:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="bp-text bp-text-plain hljs"&gt;&lt;CODE class="js"&gt;&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; filePath = &lt;SPAN class="hljs-string"&gt;"C:\\\\Users\\username\\Downloads\\doc.kml"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; targetClassName = &lt;SPAN class="hljs-string"&gt;"BUILDINGS"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; city = app.ActiveModel;

&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; importKML = &lt;SPAN class="hljs-function"&gt;&lt;SPAN class="hljs-keyword"&gt;function&lt;/SPAN&gt; (&lt;SPAN class="hljs-params"&gt;city, kmlFile, targeClassName&lt;/SPAN&gt;) &lt;/SPAN&gt;{

    &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (!file.FileExists(kmlFile)) {
        printf(&lt;SPAN class="hljs-string"&gt;"Error: KML file not found: "&lt;/SPAN&gt; + kmlFile);
        &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt; &lt;SPAN class="hljs-literal"&gt;false&lt;/SPAN&gt;;
    }

    &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; providers = app.GetDataProviders(&lt;SPAN class="hljs-string"&gt;".kmz"&lt;/SPAN&gt;);
    &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; success = &lt;SPAN class="hljs-literal"&gt;true&lt;/SPAN&gt;;

    &lt;SPAN class="hljs-keyword"&gt;for&lt;/SPAN&gt; (p &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; providers) {

        &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; configs = providers[p].FileConnect(city, kmlFile);

        &lt;SPAN class="hljs-keyword"&gt;for&lt;/SPAN&gt; (c &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; configs) {

            &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; cfg = configs[c];
            cfg.TargetClassName = targetClassName;
            cfg.SourceCoordSys = &lt;SPAN class="hljs-string"&gt;"LL84"&lt;/SPAN&gt;;

            &lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; result = cfg.Import();

            &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (result) {
                print(&lt;SPAN class="hljs-string"&gt;"INFO: KML Import success"&lt;/SPAN&gt;);
            } &lt;SPAN class="hljs-keyword"&gt;else&lt;/SPAN&gt; {
                print(&lt;SPAN class="hljs-string"&gt;"Error: KML Import Failed"&lt;/SPAN&gt;);
                success = &lt;SPAN class="hljs-literal"&gt;false&lt;/SPAN&gt;;
            }

        }
    }

    &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt; success;
};

importKML(city, filePath, targetClassName);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Dec 2017 21:49:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636603#M14212</guid>
      <dc:creator>elliott.rosenfeld</dc:creator>
      <dc:date>2017-12-19T21:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636621#M14213</link>
      <description>&lt;P&gt;Is there away to bring the individual DAE files in so they are oriented and in the correct location?&amp;nbsp; When I open the KMZ file I was provide I can see them all on the site in Google Earth.&amp;nbsp; I've brought lots of DAE files into Infraworks but I've only ever interactively placed them in the model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response Elliot I appreciate it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Casey Bekkerus&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 21:55:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636621#M14213</guid>
      <dc:creator>caseybek95</dc:creator>
      <dc:date>2017-12-19T21:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636645#M14214</link>
      <description>&lt;P&gt;Hi Casey,&lt;BR /&gt;&lt;BR /&gt;I noticed that &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2011095"&gt;@John_de_Leeuw-NTI&lt;/a&gt;&amp;nbsp;posted a script that may solve your problems on another thread. If John's advice isn't what you are looking for, yes you can definitely modify the placement of your .DAE files during import/configuration into InfraWorks. Instead of doing interactive placing, you can specify an arbitrary XY (Meters or Ft.) Source Coordinate System for the data in the "Coordinate System" field within the GeoLocation tab of the Data Source Configuration dialog, then input specific coordinates (Lat/Long or Northing/Easting typically) in the Position field for each .DAE you import. You can also apply X,Y,Z offsets or modify scale and rotation rotation. You can also check out these help topics:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://help.autodesk.com/view/INFMDR/ENU/?guid=GUID-3626ABC8-4E3D-4ECA-B583-EC5C2ADDFD75" target="_blank"&gt;To import 3D models&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://help.autodesk.com/view/INFMDR/ENU/?guid=GUID-ADC0B758-7054-4A4F-A30D-46F0DA6901E8" target="_blank"&gt;To specify geolocation settings&lt;/A&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="config.png" style="width: 538px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/441074i8CDCABBEB2892DAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="config.png" alt="config.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 19 Dec 2017 22:04:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7636645#M14214</guid>
      <dc:creator>elliott.rosenfeld</dc:creator>
      <dc:date>2017-12-19T22:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7658665#M14215</link>
      <description>&lt;P&gt;Any Chance anyone has the Script that Elliott is referring to?&amp;nbsp;&amp;nbsp; Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 15:13:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7658665#M14215</guid>
      <dc:creator>caseybek95</dc:creator>
      <dc:date>2018-01-02T15:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7661955#M14216</link>
      <description>&lt;P&gt;Hi Casey, sorry for not including the link previously, silly oversight. Here's the link to a great article that&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2011095"&gt;@John_de_Leeuw-NTI&lt;/a&gt;&amp;nbsp;wrote about this: &lt;A href="https://knowledge.autodesk.com/support/infraworks/learn-explore/caas/simplecontent/content/aiw360-batch-import-kmlcollada.html" target="_blank"&gt;https://knowledge.autodesk.com/support/infraworks/learn-explore/caas/simplecontent/content/aiw360-batch-import-kmlcollada.html&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Let us know how this works out!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 19:40:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7661955#M14216</guid>
      <dc:creator>elliott.rosenfeld</dc:creator>
      <dc:date>2018-01-03T19:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7662375#M14217</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 22:18:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/7662375#M14217</guid>
      <dc:creator>caseybek95</dc:creator>
      <dc:date>2018-01-03T22:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/10206078#M14218</link>
      <description>&lt;P&gt;Hi guy, thanks for the link !&lt;/P&gt;&lt;P&gt;By chance, would you havethe 2 scripts normally provided in the post ? The download links are currently broken.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 21:49:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/10206078#M14218</guid>
      <dc:creator>vincent.bonnefoiS9BT5</dc:creator>
      <dc:date>2021-04-01T21:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Insert KML files</title>
      <link>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/10206102#M14219</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9812459"&gt;@vincent.bonnefoiS9BT5&lt;/a&gt;&amp;nbsp; Im not sure what link you are talking about. The script is visible to copy/paste as .js file above here and other help scripts also seem to be valid.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 22:10:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/infraworks-forum/insert-kml-files/m-p/10206102#M14219</guid>
      <dc:creator>ramesh_sridharan</dc:creator>
      <dc:date>2021-04-01T22:10:35Z</dc:date>
    </item>
  </channel>
</rss>

