<?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: ScheduleSheetInstance bounding box in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620178#M54017</link>
    <description>&lt;P&gt;Don't worry, I understand you are joking)&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2017 13:30:49 GMT</pubDate>
    <dc:creator>aignatovich</dc:creator>
    <dc:date>2017-12-13T13:30:49Z</dc:date>
    <item>
      <title>ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7619803#M54013</link>
      <description>&lt;P&gt;Hi folks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a little question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to place schedules to the view sheet in a vertical chain. The result should be something like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="target.PNG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/438486iCD9DCBD322FDF610/image-size/large?v=v2&amp;amp;px=999" role="button" title="target.PNG" alt="target.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Actually there are 2 (or more) schedules. I've already achieved what I want. I retrieve bounding box on active viewsheet of each ScheduleSheetInstance and move insertion point for each schedule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that ScheduleSheetInstance bounding box is a bit large than actual schedule table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="borders.png" style="width: 564px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/438495i67A803233FD2E0F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="borders.png" alt="borders.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've draw borders with this python shell code:&lt;/P&gt;&lt;PRE&gt;shInst = selection[0] # a ScheduleSheetInstance should be selected to run this code

bb = shInst.get_BoundingBox(doc.ActiveView)

tx = Transaction(doc, "bounds")
tx.Start()

doc.Create.NewDetailCurve(doc.ActiveView, Line.CreateBound(bb.Min, XYZ(bb.Min.X, bb.Max.Y, 0)))
doc.Create.NewDetailCurve(doc.ActiveView, Line.CreateBound(XYZ(bb.Min.X, bb.Max.Y, 0), bb.Max))
doc.Create.NewDetailCurve(doc.ActiveView, Line.CreateBound(bb.Max, XYZ(bb.Max.X, bb.Min.Y, 0)))
doc.Create.NewDetailCurve(doc.ActiveView, Line.CreateBound(XYZ(bb.Max.X, bb.Min.Y, 0), bb.Min))

tx.Commit()&lt;/PRE&gt;&lt;P&gt;The distance is ~2.12 mm. I hardcoded this value in my code. It seems it works, but I don't know if it works in every possible cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the question is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to retrieve this value via API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers, Alexander&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 11:18:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7619803#M54013</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2017-12-13T11:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620041#M54014</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Alexander,&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 for your query.&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;How picky you are&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&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;I passed on the question to the development team for you.&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 hope this helps.&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;Best regards,&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;</description>
      <pubDate>Wed, 13 Dec 2017 12:48:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620041#M54014</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-12-13T12:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620056#M54015</link>
      <description>&lt;P&gt;Thank you, Jeremy!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I like good code and don't like magic constants &lt;img id="robotwink" class="emoticon emoticon-robotwink" src="https://forums.autodesk.com/i/smilies/16x16_robot-wink.png" alt="Robot wink" title="Robot wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 12:52:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620056#M54015</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2017-12-13T12:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620115#M54016</link>
      <description>&lt;P&gt;My pleasure! I like good code too! Just joking ...&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 13:12:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620115#M54016</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-12-13T13:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620178#M54017</link>
      <description>&lt;P&gt;Don't worry, I understand you are joking)&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 13:30:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7620178#M54017</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2017-12-13T13:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7622822#M54018</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Alexander,&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 for your patience.&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 heard back from the development team.&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;They absolutely confirm your current approach and provide the magic constant that you were looking for:&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;For a schedule instance in the sheet view, we add an invisible margin around the actual schedule table.&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;This margin will show up when selecting the schedule instance.&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;The margin width is a hardcoded value in the schedule code.&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;It is 1/12" which is around 2.12 mm.&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;Right now, there is no way to retrieve this value through API as it is not exposed yet.&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 think it is safe to use this hardcoded value as it has been there and remained constant for years.&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;This is what the schedule instance margin looks like when selecting the schedule instance.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="schedule_instance.png" style="width: 632px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/438966i2BB8525ED78AE17E/image-size/large?v=v2&amp;amp;px=999" role="button" title="schedule_instance.png" alt="schedule_instance.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN&gt;You can see that the move control and the drag height control are showing at the margin bounding box.&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 hope this helps.&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;Best regards,&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;</description>
      <pubDate>Thu, 14 Dec 2017 07:07:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7622822#M54018</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-12-14T07:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7634252#M54019</link>
      <description>&lt;P&gt;Thank you, Jeremy!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 08:13:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7634252#M54019</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2017-12-19T08:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: ScheduleSheetInstance bounding box</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7644156#M54020</link>
      <description>&lt;P&gt;Published for posterity:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2017/12/magic-number-magic-automation-and-magic-season.html#2" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2017/12/magic-number-magic-automation-and-magic-season.html#2&lt;/A&gt;&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;</description>
      <pubDate>Fri, 22 Dec 2017 10:28:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/schedulesheetinstance-bounding-box/m-p/7644156#M54020</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-12-22T10:28:51Z</dc:date>
    </item>
  </channel>
</rss>

