<?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: Unable to Import 3D Files with real-world position in 3D Questions</title>
    <link>https://community.esri.com/t5/3d-questions/unable-to-import-3d-files-with-real-world-position/m-p/57230#M391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The help lists the syntax as: Import3DFiles_3d (in_files, out_featureClass, {root_per_feature}, {spatial_reference}, {y_is_up}, {file_suffix}, {in_featureClass}, {symbol_field})&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears you have missed one parameter and incorrectly specified the optional parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that you don't need to type out the 'in_featureClass =' etc, just add the string or variable in the correct location&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, the parameters are read in order meaning you either need to specify one of the available options (i.e "Z_IS_UP") or accept the default option ("#")- You still need to put &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;something&lt;/SPAN&gt;&lt;SPAN&gt; there otherwise your parameters will get mixed up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I think you should have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import the files using the point feature class and specifying the symbol_field
arcpy.Import3DFiles_3d("D:\\foo", "D:\\bar.gdb\\baz", spacial_ref, "Z_IS_UP", "flt", "D:\\bar.gdb\\qux", "OFNAME")
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:10:29 GMT</pubDate>
    <dc:creator>TimBarnes</dc:creator>
    <dc:date>2021-12-10T22:10:29Z</dc:date>
    <item>
      <title>Unable to Import 3D Files with real-world position</title>
      <link>https://community.esri.com/t5/3d-questions/unable-to-import-3d-files-with-real-world-position/m-p/57229#M390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The following link identifies a method of importing one or more 3D models into a multipatch feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00q900000097000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00q900000097000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Test Case&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have thus implemented this using arcpy in the following test case to import 2 OpenFlight files from 'D:\foo', (test1.flt and test2.flt): -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# check out 3d analyst license

# use the appropriate reference system
spacial_ref = arcpy.SpatialReference()
spacial_ref.factoryCode = 4326 # WGS84 http://spatialreference.org/ref/epsg/4326/
spacial_ref.create()

# create the database
arcpy.CreateFileGDB_management("D:\\", "bar.gdb")

# create a point feature class to act as the 'in_featureClass' parameter
arcpy.CreateFeatureclass_management("D:\\bar.gdb", "qux", "POINT", spatial_reference = spacial_ref)

# Add a field in the point feature class that will contain the name of the 3d file
arcpy.AddField_management("D:\\bar.gdb\\qux", "OFNAME", "TEXT")

with arcpy.da.InsertCursor("D:\\bar.gdb\\qux",("OFNAME", "SHAPE@XY")) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.insertRow(("test1.flt", (52.1, 4.0)))
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.insertRow(("test2.flt", (52.2, 4.1)))

# Import the files using the point feature class and specifying the symbol_field
arcpy.Import3DFiles_3d("D:\\foo", "D:\\bar.gdb\\baz", spatial_reference = spacial_ref, file_suffix = "flt", in_featureClass = "D:\\bar.gdb\\qux", symbol_field = "OFNAME")

# check in 3d analyst license&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This indeed creates the bar.gdb which includes the point feature class, 'qux' and the imported openflight models, 'baz'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The confusing part, for me, is that the point feature class indeed does show the points at the correct positions, i.e. 52.1, 4.0 and 52.2, 4.1, whilst the imported models do not. They appear on top of each other at 0,0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Why do I think what I should have done works?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following quote from the link above states that an optional in_featureClass can be specified: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The point features whose coordinates define the real-world position of the input files. Each input file will be matched to its corresponding point based on the file names stored in the Symbol Field. The Coordinate System parameter should be defined to match the spatial reference of the points.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this not what I have done? I have specified the symbol_field as specified by: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The field in the point features containing the name of the 3D file associated with each point.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There seems to be no examples in the ArcGIS Resources section that shows these optional parameters being used and so far the code I have written above does not place the input files at their correct, 'real-world' position. Does anyone have any working example of this or could provide some insight as to why my input OpenFlight files are appearing at 0,0 instead of the points specified by the point feature class?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/unable-to-import-3d-files-with-real-world-position/m-p/57229#M390</guid>
      <dc:creator>ChristopherWebb</dc:creator>
      <dc:date>2021-12-10T22:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Import 3D Files with real-world position</title>
      <link>https://community.esri.com/t5/3d-questions/unable-to-import-3d-files-with-real-world-position/m-p/57230#M391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The help lists the syntax as: Import3DFiles_3d (in_files, out_featureClass, {root_per_feature}, {spatial_reference}, {y_is_up}, {file_suffix}, {in_featureClass}, {symbol_field})&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears you have missed one parameter and incorrectly specified the optional parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that you don't need to type out the 'in_featureClass =' etc, just add the string or variable in the correct location&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, the parameters are read in order meaning you either need to specify one of the available options (i.e "Z_IS_UP") or accept the default option ("#")- You still need to put &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;something&lt;/SPAN&gt;&lt;SPAN&gt; there otherwise your parameters will get mixed up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I think you should have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import the files using the point feature class and specifying the symbol_field
arcpy.Import3DFiles_3d("D:\\foo", "D:\\bar.gdb\\baz", spacial_ref, "Z_IS_UP", "flt", "D:\\bar.gdb\\qux", "OFNAME")
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/unable-to-import-3d-files-with-real-world-position/m-p/57230#M391</guid>
      <dc:creator>TimBarnes</dc:creator>
      <dc:date>2021-12-10T22:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Import 3D Files with real-world position</title>
      <link>https://community.esri.com/t5/3d-questions/unable-to-import-3d-files-with-real-world-position/m-p/57231#M392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello timmo1982,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Python, you may specify optional parameters by using their parameter name as I have done. The documentation states &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;optional&lt;/SPAN&gt;&lt;SPAN&gt; for the y_is_up parameter, thus for my scenario, the default value will suffice, surely?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A href="http://www.diveintopython.net/power_of_introspection/optional_arguments.html"&gt;http://www.diveintopython.net/power_of_introspection/optional_arguments.html&lt;/A&gt;&lt;SPAN&gt;, specifically: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;But in Python, arguments can be specified by name, in any order.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you suggesting that I have to use a hash instead of not specifying anything for an &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;optional&lt;/SPAN&gt;&lt;SPAN&gt; parameter? If so, that's very counter-intuitive and seems contrary to the design principles of Python, specifically as there is a mechanism for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 06:57:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/unable-to-import-3d-files-with-real-world-position/m-p/57231#M392</guid>
      <dc:creator>ChristopherWebb</dc:creator>
      <dc:date>2014-02-24T06:57:23Z</dc:date>
    </item>
  </channel>
</rss>

