<?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: New Dimension are not Visible in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8268048#M48882</link>
    <description>Yes and No. &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;BR /&gt;I couldn’t properly found the reference line from the face so I do it now from an other way.&lt;BR /&gt;&lt;BR /&gt;I catch now all the geometrics objects from the view (visible and invisible) and then I filter all these elements to find:&lt;BR /&gt;- a reference line parallel to the middle axis of the face;&lt;BR /&gt;- the closest reference to the middle axis.&lt;BR /&gt;&lt;BR /&gt;It’s a dirty solution, but it works and with a good filtering the performance stay acceptable.</description>
    <pubDate>Fri, 14 Sep 2018 09:59:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-14T09:59:36Z</dc:date>
    <item>
      <title>New Dimension are not Visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8119035#M48878</link>
      <description>&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm actually trying to create a new dimension for a Rebar element.&lt;/P&gt;&lt;P&gt;To sum up&amp;nbsp;I try to do&amp;nbsp;something&amp;nbsp;like the MultiAnnotation Command but without the Tag.&lt;/P&gt;&lt;P&gt;After&amp;nbsp;further&amp;nbsp;research, I found a way to catch the reference of each Rebar of the Rebar Distribution and to put a dimension on it, but the Problem is the following :&lt;/P&gt;&lt;P&gt;The function Create.Newdimension&amp;nbsp;(on the last line of my code) returns me a dimension but at the end of the execution, I can't see this dimension.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                        Options opt = app.Create.NewGeometryOptions();
                        opt.ComputeReferences = true;
                        opt.IncludeNonVisibleObjects = false;
                        opt.View = doc.ActiveView;

                        ReferenceArray referenceArray = new ReferenceArray();
                        List&amp;lt;XYZ&amp;gt; ListPoint = new List&amp;lt;XYZ&amp;gt;();

                        GeometryElement geometryElement = rebar.get_Geometry(opt);

                        foreach (GeometryObject obj in geometryElement)
                        {
                            if (obj is Solid)
                            {
                                Solid solid = obj as Solid;
                                FaceArray faceArray = solid.Faces;

                                // Search the biggest Face Area
                                Face BiggestFace = faceArray.get_Item(0);
                                foreach (Face face in faceArray)
                                {
                                    if (face.Area &amp;gt; BiggestFace.Area)
                                    {
                                        BiggestFace = face;
                                    }
                                }

                                Face fa = BiggestFace;
                                {
                                    if (fa != null)
                                    {
                                        PlanarFace planarFace = fa as PlanarFace;
                                        XYZ point = planarFace.Origin;
                                        Reference refer = planarFace.Reference;

                                        if (refer != null &amp;amp;&amp;amp; referenceArray.Size &amp;lt; 3) //I only need the 2 first Rebar Faces of the Rebar distribution
                                        {
                                            referenceArray.Append(refer);
                                            ListPoint.Add(point);
                                        }
                                    }
                                }
                            }
                        }
                        using (Transaction t = new Transaction(doc, "Creation Ligne de cote"))
                        {
                            t.Start();
                            Line line1 = Line.CreateBound(ListPoint[0], ListPoint[1]);
                            Dimension newDimension = doc.Create.NewDimension(doc.ActiveView, line1, referenceArray);
                            t.Commit();
                        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does somebody have an Idea why the new Dimensions are not visible?&lt;/P&gt;&lt;P&gt;I already&amp;nbsp;tried many modifications on the code, but I can't find if the Origin of the problem comes from the ReferenceArray or from the dimension ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 21:39:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8119035#M48878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-09T21:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: New Dimension are not Visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8119732#M48879</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Please refer to this other discussion on fixing a non-visible dimension after copying it from another view:&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;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/copy-dimensions-from-a-view-to-another/m-p/7226217" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/copy-dimensions-from-a-view-to-another/m-p/7226217&lt;/A&gt;&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;Maybe that solution will help in your case as well?&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;I already suggested this in a previous thread:&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;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/newdimension-dimension-created-but-not-visible/m-p/6340985" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/newdimension-dimension-created-but-not-visible/m-p/6340985&lt;/A&gt;&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;Please always search the forum for existing answers before posting a new question.&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;Please also let us know how you end up solving your issue.&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;Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&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;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 07:37:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8119732#M48879</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-07-10T07:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: New Dimension are not Visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8127159#M48880</link>
      <description>&lt;P&gt;Thanks Jeremy for the other threads.&lt;/P&gt;&lt;P&gt;I read them but I couldn't solve the problem with these different solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;During the week I continue to check my code and I found an interesting point which is probably at the origin of the problem.&lt;/P&gt;&lt;P&gt;To obtain the reference of "theBiggestFace" I execute the following code :&lt;/P&gt;&lt;PRE&gt;Face theBiggestFace;
PlanarFace planarFace = theBiggestFace as PlanarFace;
Reference refer = planarFace.Reference;&lt;/PRE&gt;&lt;P&gt;With this code I obtain a Reference&amp;nbsp;which ElementReferenceType is "&lt;SPAN&gt;REFERENCE_TYPE_SURFACE", a&lt;/SPAN&gt;&lt;SPAN&gt;nd in my case (with the faces are parallel to the view) the Dimension will only work with "REFERENCE_TYPE_LINEAR".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reference-surface.PNG" style="width: 440px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/522338iAE6255F2CE0C46A8/image-dimensions/440x259?v=v2" width="440" height="259" role="button" title="Reference-surface.PNG" alt="Reference-surface.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do you have an idea of how to obtain a Reference with a type : "Linear" from a Reference with a type : "Surface" ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's probably a simple&amp;nbsp;additional line at my existing code, but I couldn't find it by myself ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 20:27:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8127159#M48880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-12T20:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: New Dimension are not Visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8265386#M48881</link>
      <description>&lt;P&gt;Did you succeed in solving this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 11:11:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8265386#M48881</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-13T11:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: New Dimension are not Visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8268048#M48882</link>
      <description>Yes and No. &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;BR /&gt;I couldn’t properly found the reference line from the face so I do it now from an other way.&lt;BR /&gt;&lt;BR /&gt;I catch now all the geometrics objects from the view (visible and invisible) and then I filter all these elements to find:&lt;BR /&gt;- a reference line parallel to the middle axis of the face;&lt;BR /&gt;- the closest reference to the middle axis.&lt;BR /&gt;&lt;BR /&gt;It’s a dirty solution, but it works and with a good filtering the performance stay acceptable.</description>
      <pubDate>Fri, 14 Sep 2018 09:59:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8268048#M48882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-14T09:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: New Dimension are not Visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8268163#M48883</link>
      <description>&lt;P&gt;Thank you very much for sharing your interesting approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am glad to hear it works and is sufficiently performant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I asked, because I cleaned out a bunch of dimensioning issues in my blog post yesterday:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2018/09/rebar-wall-centreline-core-and-grid-dimensioning.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2018/09/rebar-wall-centreline-core-and-grid-dimensioning.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I should add this idea of yours as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 11:03:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/new-dimension-are-not-visible/m-p/8268163#M48883</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-14T11:03:09Z</dc:date>
    </item>
  </channel>
</rss>

