<?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: Section Views in Assemblies not placed at specified origin and will not move after in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/section-views-in-assemblies-not-placed-at-specified-origin-and/m-p/13144459#M2130</link>
    <description>&lt;P&gt;Note, a call to&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ElementTransformUtils.MoveElement()&lt;/LI-CODE&gt;&lt;P&gt;only works from a completely different command. It has no effect if I run in merely a separate transaction. It has to be during a different command execution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2024 22:08:15 GMT</pubDate>
    <dc:creator>darren.braynard2</dc:creator>
    <dc:date>2024-11-11T22:08:15Z</dc:date>
    <item>
      <title>Section Views in Assemblies not placed at specified origin and will not move after</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/section-views-in-assemblies-not-placed-at-specified-origin-and/m-p/13144238#M2128</link>
      <description>&lt;P&gt;I am getting the wrong X position when I create a section view in an assembly. AND, afterwards, I am unable to adjust the location to attempt to correct the incorrect location. This section is meant to render a junction box and conduit intersection. Also, I have tried separating the create, setting of crop box, AND the attempt at adjusting the view into different transactions and assimilated under the same transaction group. This had no effect. I have also called doc.Regenerate() between operations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="darrenbraynard2_0-1731353902180.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1432540i0CD70D0D6C33F772/image-size/medium?v=v2&amp;amp;px=400" role="button" title="darrenbraynard2_0-1731353902180.png" alt="darrenbraynard2_0-1731353902180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The resulting X location is wrong (70.2467), when it was specified to be 70.024. This inaccuracy occurs at random amounts for other assemblies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code for creating the section view (I surround the entire call in a TransactionGroup):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using var tx = new Transaction(overallView.Document);
tx.Start("Assembly JB Section Side View");

section = AssemblyViewUtils.CreateDetailSection(info.Model.ActiveAssemblyInstance.Document,info.Model.ActiveAssemblyInstance.Id, orientation);
doc.Regenerate();
tx.Commit();

using var tx2 = new Transaction(overallView.Document);
tx2.Start("Resize JB Section Side View");
section!.Name = info.Name;
//this crop box has the correct X position.
section.CropBox = crop;
section.CropBoxActive = true;
section.get_Parameter(BuiltInParameter.VIEWER_BOUND_OFFSET_FAR).Set(depthOffset);
section.get_Parameter(BuiltInParameter.VIEWER_BOUND_FAR_CLIPPING).Set(2);
tx2.Commit();

//this reports the incorrect X position
var loc1 = section.Origin;


//later (which seems to have no effect):
using var tx3 = new Transaction(overallView.Document);
tx3.Start("Adjust JB Section Side View");
var testMove = new XYZ(1, 1, 1);
ElementTransformUtils.MoveElement(doc, section.Id, testMove);
tx3.Commit();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a bug in the Revit API?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 13:56:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/section-views-in-assemblies-not-placed-at-specified-origin-and/m-p/13144238#M2128</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2024-11-12T13:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Section Views in Assemblies not placed at specified origin and will not move after</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/section-views-in-assemblies-not-placed-at-specified-origin-and/m-p/13144299#M2129</link>
      <description>&lt;P&gt;In addition, I am able to manipulate the Section View location by calling&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ElementTransformUtils.MoveElement(doc, section.Id, testMove);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from outside the transaction group.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 20:28:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/section-views-in-assemblies-not-placed-at-specified-origin-and/m-p/13144299#M2129</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2024-11-11T20:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Section Views in Assemblies not placed at specified origin and will not move after</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/section-views-in-assemblies-not-placed-at-specified-origin-and/m-p/13144459#M2130</link>
      <description>&lt;P&gt;Note, a call to&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ElementTransformUtils.MoveElement()&lt;/LI-CODE&gt;&lt;P&gt;only works from a completely different command. It has no effect if I run in merely a separate transaction. It has to be during a different command execution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 22:08:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/section-views-in-assemblies-not-placed-at-specified-origin-and/m-p/13144459#M2130</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2024-11-11T22:08:15Z</dc:date>
    </item>
  </channel>
</rss>

