<?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 getting camera's position + direction from Navigator View. in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/getting-camera-s-position-direction-from-Navigator-View/m-p/259450#M4019</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to retrieve the camera's position and direction from each of the entries under "Navigator - View Map". Currently I'm able to retrieve the API_NavigatorItem item, however it seems that&lt;BR /&gt;the camId isn't filled in. &lt;BR /&gt;
&lt;PRE&gt;-		items[0]	0x00000000125496e0 {name=0x00000000125496e0 "Demo with all layers" autoTextedName=0x0000000012549760 "Demo with all layers" uiId=0x00000000125497e0 "" ...}	API_NavigatorItem *
+		name	0x00000000125496e0 "Demo with all layers"	char [128]
+		autoTextedName	0x0000000012549760 "Demo with all layers"	char [128]
+		uiId	0x00000000125497e0 ""	char [128]
+		guid	{time_low=973274031 time_mid=59370 time_hi_and_version=18688 ...}	API_Guid
+		db	{typeID=APIWind_3DModelID index=0 databaseUnId={...} ...}	API_WindowInfo
		floorNum	0	short
		vType	0	short
		filler_1	0	int
+		camId	{time_low=0 time_mid=0 time_hi_and_version=0 ...}	API_Guid
		mapId	API_UndefinedMap	API_NavigatorMapID
		itemType	API_PerspectiveNavItem	API_NavigatorItemTypeID
+		guid2	{time_low=0 time_mid=0 time_hi_and_version=0 ...}	API_Guid
		owner	0	int
		customName	1 ''	unsigned char
		customUiId	0	unsigned char
		filler_2	0	short
+		filler_3	0x0000000012549f00	int [6]&lt;/PRE&gt;
I assume that once I get a proper camId. Then I would need to do something like the below code:&lt;BR /&gt;
&lt;PRE&gt;				API_Element element;
				BNZeroMemory( &amp;amp;element, sizeof(API_Element));
				element.header.guid = camId;					// Passing the camId
				GSErrCode err = ACAPI_Element_Get(&amp;amp;element);
				if ( err == NoError )
				{
					// check the element.camera or cameraset for the parameters.
				}	
&lt;/PRE&gt;
Is this the right way of going about it? If so how can I get a valid camId? If not what is an alternative way of accomplishing the above? &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ian&lt;/DIV&gt;</description>
    <pubDate>Tue, 06 Dec 2022 12:45:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-12-06T12:45:53Z</dc:date>
    <item>
      <title>getting camera's position + direction from Navigator View.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/getting-camera-s-position-direction-from-Navigator-View/m-p/259450#M4019</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to retrieve the camera's position and direction from each of the entries under "Navigator - View Map". Currently I'm able to retrieve the API_NavigatorItem item, however it seems that&lt;BR /&gt;the camId isn't filled in. &lt;BR /&gt;
&lt;PRE&gt;-		items[0]	0x00000000125496e0 {name=0x00000000125496e0 "Demo with all layers" autoTextedName=0x0000000012549760 "Demo with all layers" uiId=0x00000000125497e0 "" ...}	API_NavigatorItem *
+		name	0x00000000125496e0 "Demo with all layers"	char [128]
+		autoTextedName	0x0000000012549760 "Demo with all layers"	char [128]
+		uiId	0x00000000125497e0 ""	char [128]
+		guid	{time_low=973274031 time_mid=59370 time_hi_and_version=18688 ...}	API_Guid
+		db	{typeID=APIWind_3DModelID index=0 databaseUnId={...} ...}	API_WindowInfo
		floorNum	0	short
		vType	0	short
		filler_1	0	int
+		camId	{time_low=0 time_mid=0 time_hi_and_version=0 ...}	API_Guid
		mapId	API_UndefinedMap	API_NavigatorMapID
		itemType	API_PerspectiveNavItem	API_NavigatorItemTypeID
+		guid2	{time_low=0 time_mid=0 time_hi_and_version=0 ...}	API_Guid
		owner	0	int
		customName	1 ''	unsigned char
		customUiId	0	unsigned char
		filler_2	0	short
+		filler_3	0x0000000012549f00	int [6]&lt;/PRE&gt;
I assume that once I get a proper camId. Then I would need to do something like the below code:&lt;BR /&gt;
&lt;PRE&gt;				API_Element element;
				BNZeroMemory( &amp;amp;element, sizeof(API_Element));
				element.header.guid = camId;					// Passing the camId
				GSErrCode err = ACAPI_Element_Get(&amp;amp;element);
				if ( err == NoError )
				{
					// check the element.camera or cameraset for the parameters.
				}	
&lt;/PRE&gt;
Is this the right way of going about it? If so how can I get a valid camId? If not what is an alternative way of accomplishing the above? &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ian&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Dec 2022 12:45:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/getting-camera-s-position-direction-from-Navigator-View/m-p/259450#M4019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-06T12:45:53Z</dc:date>
    </item>
  </channel>
</rss>

