<?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 Request the model coordinates of the bouniding box of a View in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Request-the-model-coordinates-of-the-bouniding-box-of-a-View/m-p/278629#M4808</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi I'm trying to make a drawing title that is used for the grid of a map. I wonder if I can get the world coordinates of the bounding box of the view of the drawing in layout. I'm trying to use AC_DrawingRect but I don't know if it will give me the desired results.&lt;/DIV&gt;</description>
    <pubDate>Thu, 13 Jul 2023 14:23:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-13T14:23:56Z</dc:date>
    <item>
      <title>Request the model coordinates of the bouniding box of a View</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Request-the-model-coordinates-of-the-bouniding-box-of-a-View/m-p/278629#M4808</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi I'm trying to make a drawing title that is used for the grid of a map. I wonder if I can get the world coordinates of the bounding box of the view of the drawing in layout. I'm trying to use AC_DrawingRect but I don't know if it will give me the desired results.&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jul 2023 14:23:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Request-the-model-coordinates-of-the-bouniding-box-of-a-View/m-p/278629#M4808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T14:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Request the model coordinates of the bouniding box of a</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Request-the-model-coordinates-of-the-bouniding-box-of-a-View/m-p/278630#M4809</link>
      <description>IIRC the 'AC_DrawingRect' refers to the drawing's size (or box or location) in the layout, not the view shown in the drawing.&lt;BR /&gt;
&lt;BR /&gt;
You need to get the drawing's linked view in the View Map (as API_NavigatorItem). Once you got it use:
&lt;PRE&gt;    GSErrCode ACAPI_Environment (
        APIEnv_GetNavigatorViewID,
        API_NavigatorItem*     navigatorItem,
        API_NavigatorView*     navigatorView
    );
&lt;/PRE&gt;
The var 'zoom' in the 'API_NavigatorView' holds the box/coordinates in model space.&lt;BR /&gt;
&lt;BR /&gt;
As for getting the drawing's linked view... Well I haven't tried getting it but I'm guessing it's in the 'linkGuid' of 'API_DrawingLinkInfo'
&lt;PRE&gt;    GSErrCode ACAPI_Database (
        APIDb_GetDrawingLinkID,
        const API_Guid*          guid,
        API_DrawingLinkInfo*     drawingLinkInfo
    );
&lt;/PRE&gt;
Pass the Guid in the function APIEnv_GetNavigatorItemID then perform the first code above.</description>
      <pubDate>Thu, 25 Jun 2015 09:57:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Request-the-model-coordinates-of-the-bouniding-box-of-a-View/m-p/278630#M4809</guid>
      <dc:creator>Erenford</dc:creator>
      <dc:date>2015-06-25T09:57:48Z</dc:date>
    </item>
  </channel>
</rss>

