<?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: NewFamilyInstance fails on Structural Foundations in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5467664#M74446</link>
    <description>&lt;P&gt;Hi Aaron&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tnx for reply.&lt;/P&gt;&lt;P&gt;Could i possibly email&amp;nbsp;the template file&amp;nbsp;directly to you ?&lt;/P&gt;&lt;P&gt;The input box expects meters, eg 10,10,10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code is here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Selection&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; sel = uiApp.ActiveUIDocument.Selection;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Reference&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; pickedRef = sel.PickObject(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;ObjectType&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.Element, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Select Element"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Element&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; elem = doc.GetElement(pickedRef);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilyInstance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; famInst = elem &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;as&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilyInstance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilySymbol&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; fam = famInst.Symbol;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; feet_to_m = 0.30480;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Transaction&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; trans = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Transaction&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;(doc);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;trans.Start(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Copy to Location"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;[] inpArr = Microsoft.VisualBasic.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Interaction&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.InputBox(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Destination XYZ[m]:"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Revit"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;).Split(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;','&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;NumberFormatInfo&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; provider = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;NumberFormatInfo&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;provider.NumberDecimalSeparator = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; x_inp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Convert&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ToDouble(inpArr[1], provider);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; y_inp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Convert&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ToDouble(inpArr[0], provider);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; z_inp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Convert&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ToDouble(inpArr[2], provider);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;XYZ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; xyzLocalImp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;XYZ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;(x_inp, y_inp, z_inp).Divide(feet_to_m);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilyInstance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; fi= doc.Create.NewFamilyInstance(xyzLocalImp, fam, Autodesk.Revit.DB.Structure.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;StructuralType&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.NonStructural);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;trans.Commit();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;catch&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; (Autodesk.Revit.Exceptions.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;OperationCanceledException&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jan 2015 13:44:37 GMT</pubDate>
    <dc:creator>HD12310</dc:creator>
    <dc:date>2015-01-13T13:44:37Z</dc:date>
    <item>
      <title>NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5462245#M74444</link>
      <description>&lt;P&gt;Fourth overload of NewFamilyInstance&amp;nbsp;seems unpredictable on Structural Foundations. (pile caps)&lt;/P&gt;&lt;P&gt;Problem being the Z-value&amp;nbsp;(offset from Level)&amp;nbsp;is not set on the new familyinstance.&lt;/P&gt;&lt;P&gt;And so the copied element doesnt get&amp;nbsp;placed on&amp;nbsp;the correct Z location. (XY&amp;nbsp;gets correct)&lt;/P&gt;&lt;P&gt;This happens only in some Revit project files.&lt;/P&gt;&lt;P&gt;In new projects created from&amp;nbsp;OOTB templates it works fine,&amp;nbsp;but not&amp;nbsp;in our project files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fourth overload looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;FamilyInstance&lt;/SPAN&gt;&lt;SPAN&gt; NewFamilyInstance(&lt;/SPAN&gt;&lt;SPAN&gt;XYZ&lt;/SPAN&gt;&lt;SPAN&gt; location, &lt;/SPAN&gt;&lt;SPAN&gt;FamilySymbol&lt;/SPAN&gt;&lt;SPAN&gt; symbol, &lt;/SPAN&gt;&lt;SPAN&gt;StructuralType&lt;/SPAN&gt;&lt;SPAN&gt; structuralType);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone had similar&amp;nbsp;issues with this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 07:47:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5462245#M74444</guid>
      <dc:creator>HD12310</dc:creator>
      <dc:date>2015-01-08T07:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5467278#M74445</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN&gt;Håvard,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Would you please attach your example rvt file and some code snippet? so that we can better reproduce your problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2015 06:27:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5467278#M74445</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-01-13T06:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5467664#M74446</link>
      <description>&lt;P&gt;Hi Aaron&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tnx for reply.&lt;/P&gt;&lt;P&gt;Could i possibly email&amp;nbsp;the template file&amp;nbsp;directly to you ?&lt;/P&gt;&lt;P&gt;The input box expects meters, eg 10,10,10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code is here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Selection&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; sel = uiApp.ActiveUIDocument.Selection;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Reference&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; pickedRef = sel.PickObject(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;ObjectType&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.Element, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Select Element"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Element&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; elem = doc.GetElement(pickedRef);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilyInstance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; famInst = elem &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;as&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilyInstance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilySymbol&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; fam = famInst.Symbol;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; feet_to_m = 0.30480;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Transaction&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; trans = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Transaction&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;(doc);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;trans.Start(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Copy to Location"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;[] inpArr = Microsoft.VisualBasic.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Interaction&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.InputBox(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Destination XYZ[m]:"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"Revit"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;).Split(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;','&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;NumberFormatInfo&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; provider = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;NumberFormatInfo&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;provider.NumberDecimalSeparator = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; x_inp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Convert&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ToDouble(inpArr[1], provider);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; y_inp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Convert&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ToDouble(inpArr[0], provider);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;double&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; z_inp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Convert&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ToDouble(inpArr[2], provider);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;XYZ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; xyzLocalImp = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;new&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;XYZ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;(x_inp, y_inp, z_inp).Divide(feet_to_m);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FamilyInstance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; fi= doc.Create.NewFamilyInstance(xyzLocalImp, fam, Autodesk.Revit.DB.Structure.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;StructuralType&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.NonStructural);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;trans.Commit();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;catch&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; (Autodesk.Revit.Exceptions.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;OperationCanceledException&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2015 13:44:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5467664#M74446</guid>
      <dc:creator>HD12310</dc:creator>
      <dc:date>2015-01-13T13:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5467680#M74447</link>
      <description>yes, aaron.lu@autodesk.com&lt;BR /&gt;&lt;BR /&gt;you can try to send by email, but im not sure if the big sized file can be transfered successfully.</description>
      <pubDate>Tue, 13 Jan 2015 13:51:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5467680#M74447</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-01-13T13:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5468800#M74448</link>
      <description>&lt;P&gt;Dear&amp;nbsp;Håvard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the Z position is incorrect is because the "Structural Foundation" is level based, to meet your need, you have to set the "Offset" of the instance created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is the code snippet example:&lt;/P&gt;
&lt;PRE&gt;FamilyInstance fi = doc.Create.NewFamilyInstance(xyzLocalImp, fam, Autodesk.Revit.DB.Structure.StructuralType.Footing);
Parameter pp = fi.get_Parameter(BuiltInParameter.INSTANCE_FREE_HOST_OFFSET_PARAM);
if (pp != null)
{
    pp.Set(30);
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 08:33:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5468800#M74448</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-01-14T08:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5468999#M74449</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I think that might be an ok work around (and is quite easy to implement in the code), but it does not answer why&amp;nbsp;this overload works fine&amp;nbsp;with the same Structural Foundations&amp;nbsp;family in some *.rvt file as it does not in other *.rvt files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Ola Gunnar&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 12:42:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5468999#M74449</guid>
      <dc:creator>ola.gunnar.skippervik</dc:creator>
      <dc:date>2015-01-14T12:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5469036#M74450</link>
      <description>&lt;P&gt;Thanks for mentioning it, dose anyone have an example rvt file containing the different situations? if yes, would you send it to me so I can do a research.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 13:12:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5469036#M74450</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-01-14T13:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5469046#M74451</link>
      <description>&lt;P&gt;Well its your call Ole Gunnar as it's your code here &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would have to set the Level for the family as well and/or determine&amp;nbsp;its relative location if not 0.&lt;/P&gt;&lt;P&gt;(After setting or detecting which category the user wants to insert)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I agree with you it doesnt explain why the behaviour is not consistent across different projects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aaron: this works in the ootb templates included with Revit.&lt;/P&gt;&lt;P&gt;"Default Metric.rtf" should do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 13:21:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5469046#M74451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-14T13:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5474028#M74452</link>
      <description>&lt;P&gt;I got comment from development team&amp;nbsp;Arnošt, he said&lt;/P&gt;
&lt;P&gt;"It is not something that can be easily explained or reasoned with. In this case (of the footing sometimes works but not all the time) we can only sat "it depends". That i because Revit always tries to manage the model even if it means that sometimes it must guess absent data. Naturally, this guessing works sometimes, if the user's lucky enough, but it cannot work all the time, understandingly"&lt;/P&gt;
&lt;P&gt;"It is a very old, hand-written API"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;He also suggest using a newer API method which takes a Level as argument, it is safer and more stable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; FamilyInstance NewFamilyInstance(XYZ location, FamilySymbol symbol, Level level, StructuralType structuralType)&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jan 2015 02:23:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5474028#M74452</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-01-19T02:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: NewFamilyInstance fails on Structural Foundations</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5474206#M74453</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for investigating this Aaron.&lt;/P&gt;&lt;P&gt;Truly interresting issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My tip to codeauthor Ole Gunnar is to determine&amp;nbsp;the Level based on the XYZ point.&lt;/P&gt;&lt;P&gt;A "GetLevelFromPoint(XYZ)" subfunction should be able to handle the extra Level argument.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jan 2015 08:14:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/newfamilyinstance-fails-on-structural-foundations/m-p/5474206#M74453</guid>
      <dc:creator>HD12310</dc:creator>
      <dc:date>2015-01-19T08:14:21Z</dc:date>
    </item>
  </channel>
</rss>

