<?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: Placing Object with desired Hotspot in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161856#M5183</link>
    <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;Are there any way the place object using another HOTSPOT. So I can rotate it correctly. And easy.&lt;/BLOCKQUOTE&gt;
Yes, you can set the index of the hotspot to use. Refer to the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;fixPoint&lt;E&gt;&lt;/E&gt; field of the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_ObjectType&lt;E&gt;&lt;/E&gt; structure.</description>
    <pubDate>Mon, 17 Jan 2011 10:18:09 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2011-01-17T10:18:09Z</dc:date>
    <item>
      <title>Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161855#M5182</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;At last, I can put my object on the floorplan and I can change some attribute of it&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?p=182285#1" target="_blank" rel="noopener"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?p=182285#1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My object have many hotspot but now I can use only default hotspot to place it.&lt;BR /&gt;&lt;BR /&gt;Are there any way the place object using another HOTSPOT. So I can rotate it correctly. And easy.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2023 08:30:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161855#M5182</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-03T08:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161856#M5183</link>
      <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;Are there any way the place object using another HOTSPOT. So I can rotate it correctly. And easy.&lt;/BLOCKQUOTE&gt;
Yes, you can set the index of the hotspot to use. Refer to the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;fixPoint&lt;E&gt;&lt;/E&gt; field of the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_ObjectType&lt;E&gt;&lt;/E&gt; structure.</description>
      <pubDate>Mon, 17 Jan 2011 10:18:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161856#M5183</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-01-17T10:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161857#M5184</link>
      <description>&lt;PRE&gt;       element.object.libInd = part.index;
		element.object.level = level;
		element.object.pos.x = x;
		element.object.pos.y = y;
		element.object.xRatio = getParams.a;
		element.object.yRatio = getParams.b;
		memo.params = getParams.params;

		element.object.fixPoint = 3;

		API_Element mask;

		ACAPI_ELEMENT_MASK_CLEAR (mask);
		ACAPI_ELEMENT_MASK_SET (mask, API_ObjectType, fixPoint);

		ACAPI_Element_ChangeDefaults(&amp;amp;element,NULL,&amp;amp;mask);
		err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);
		&lt;/PRE&gt;

Like this?, But It's not work. It's only use default hotspot at the same.&lt;BR /&gt;
&lt;BR /&gt;
Do you have any example?</description>
      <pubDate>Tue, 18 Jan 2011 03:36:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161857#M5184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-18T03:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161858#M5185</link>
      <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;But It's not work. It's only use default hotspot at the same. Do you have any example?&lt;/BLOCKQUOTE&gt;
It works for me - I think I'd need to see more of your source code to understand where it's going wrong. I write code through an object wrapper rather than plain C, so it isn't directly applicable to your case, e.g.&lt;PRE&gt;Object object("myObjectName");
object.setOriginIndex(3);
activeDrawing.put(object);&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jan 2011 17:47:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161858#M5185</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-01-18T17:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161859#M5186</link>
      <description>I will re-write code to show you.&lt;BR /&gt;
&lt;BR /&gt;
Thank you.</description>
      <pubDate>Wed, 19 Jan 2011 02:45:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161859#M5186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-19T02:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161860#M5187</link>
      <description>OK. &lt;BR /&gt;
&lt;BR /&gt;
1. You have to load my gsm file to your embedded library by yourself. (Not by code) The gsm file is in the zip file below.&lt;BR /&gt;
&lt;BR /&gt;
2. Write Menu Code By This Function&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	switch (menuParams-&amp;gt;menuItemRef.menuResID) {
		case 32500:		/* Library Parts */
				switch (menuParams-&amp;gt;menuItemRef.itemIndex) {
					case 1:		Do_CreateObjectOnFixHotspot();		break;
				}
				break;
	}&lt;/PRE&gt;

3. And placing object code that have to fix at comment line&lt;BR /&gt;

&lt;PRE&gt;static void Do_CreateObjectOnFixHotspot()
{
	ACAPI_OpenUndoableSession("Test Draw Object With Desired Hotspot");

	API_LibPart part;   
	GSErrCode err;   
	BNZeroMemory(&amp;amp;part, sizeof(API_LibPart));   

	CHANSI2Unicode("ไม้พื้นสมาร์ทวูด10x300x25.gsm", strlen("ไม้พื้นสมาร์ทวูด10x300x25.gsm"), part.file_UName, API_UniLongNameLen);  

	if((err = ACAPI_LibPart_Search(&amp;amp;part, false)) == NoError)   
	{ 
		API_Element element;
		API_ElementMemo memo;
		BNZeroMemory(&amp;amp;element, sizeof(API_Element));
		BNZeroMemory(&amp;amp;memo, sizeof(API_ElementMemo));
		double A = 0;
		double B = 0;
		Int32 parCount = 0;
		//----
		element.header.typeID = API_ObjectID;
		err = ACAPI_Element_GetDefaults(&amp;amp;element, NULL);
		err = ACAPI_LibPart_GetParams(part.index, &amp;amp;A, &amp;amp;B, &amp;amp;parCount, &amp;amp;memo.params);

		element.object.libInd = part.index;
		element.object.level  = 0;
		element.object.pos.x  = 0;
		element.object.pos.y  = 0;
		element.object.xRatio = A;
		element.object.yRatio = B;

		element.object.fixPoint = 0;		//0 is default value
		//element.object.fixPoint = 1;		//Change to this three line ...
		//element.object.fixPoint = 2;		//But location placing hotspot is the same
		//element.object.fixPoint = 3;

		err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);
		
		ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
	}
	ACAPI_CloseUndoableSession();
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Jan 2011 03:02:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161860#M5187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-19T03:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161861#M5188</link>
      <description>The code above not work.&lt;BR /&gt;
&lt;BR /&gt;
I'm waiting for your answer.&lt;BR /&gt;
&lt;BR /&gt;
Thank you</description>
      <pubDate>Fri, 21 Jan 2011 06:54:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161861#M5188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-21T06:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161862#M5189</link>
      <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;2. Write Menu Code By This Function
&lt;PRE&gt;etc&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;
I've tested this and it works, although I didn't try your object. If you open the settings of the placed object, does the placement hotspot in the 2D preview remain the same irrespective of the hotspot you pick in the code? If so, perhaps there is an issue with that object. Try a very simple object first (to make sure the code is correct) and work up from there.</description>
      <pubDate>Mon, 24 Jan 2011 13:34:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161862#M5189</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-01-24T13:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161863#M5190</link>
      <description>I use API DevKit 14. And you?&lt;BR /&gt;
&lt;BR /&gt;
I tested with simple object too. Use placing Hotspot not change too.&lt;BR /&gt;
&lt;BR /&gt;
OK. I will continue check&lt;BR /&gt;
&lt;BR /&gt;
Thank you</description>
      <pubDate>Tue, 25 Jan 2011 02:06:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161863#M5190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-25T02:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161864#M5191</link>
      <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;I use API DevKit 14. And you?&lt;/BLOCKQUOTE&gt;
Yes, I used the same.</description>
      <pubDate>Tue, 25 Jan 2011 09:03:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161864#M5191</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-01-25T09:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161865#M5192</link>
      <description>I know this is not what you're discussing, but is there some "developer" code that makes an object NOT respond to the hotspot that is EYEDROPPERED?&lt;BR /&gt;
&lt;BR /&gt;
For example, I have an object in plan... I used to be able to EYEDROPPER the CENTER HOTSPOT and all subsequent placement would place by the center... This does not seem to happen anymore..</description>
      <pubDate>Tue, 25 Jan 2011 15:09:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161865#M5192</guid>
      <dc:creator>vfrontiers</dc:creator>
      <dc:date>2011-01-25T15:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161866#M5193</link>
      <description>&lt;BLOCKQUOTE&gt;vfrontiers wrote:&lt;BR /&gt;I know this is not what you're discussing, but is there some "developer" code that makes an object NOT respond to the hotspot that is EYEDROPPERED?&lt;BR /&gt;
&lt;BR /&gt;
For example, I have an object in plan... I used to be able to EYEDROPPER the CENTER HOTSPOT and all subsequent placement would place by the center... This does not seem to happen anymore..&lt;/BLOCKQUOTE&gt;

This has been reported - and I was about to report it again, as it has been a few years and still not fixed.  Cannot remember if this "broke" in 12 or 13.  But, it prevents using visual favorites properly, such as with the Detailer palettes.&lt;BR /&gt;
&lt;BR /&gt;
But, yeah, wrong forum:  this is a Working in ArchiCAD issue.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Karl</description>
      <pubDate>Tue, 25 Jan 2011 17:48:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161866#M5193</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2011-01-25T17:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Placing Object with desired Hotspot</title>
      <link>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161867#M5194</link>
      <description>I upload this source code to you&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www.porrapat.com/ArchiCAD_Add-On1.zip" target="_blank"&gt;http://www.porrapat.com/ArchiCAD_Add-On1.zip&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
To help me find the problem.&lt;BR /&gt;
&lt;BR /&gt;
It's place object with the same location.&lt;BR /&gt;
&lt;BR /&gt;
But I don't want it&lt;BR /&gt;
&lt;BR /&gt;
------------------------------------------------------------------------------&lt;BR /&gt;
I use API Devkit 14.2550 on WindowsXP Service Pack 2&lt;BR /&gt;
Running on ArchiCAD 14 Demo. Using visual studio 2005 to compile</description>
      <pubDate>Thu, 27 Jan 2011 03:14:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Placing-Object-with-desired-Hotspot/m-p/161867#M5194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-27T03:14:14Z</dc:date>
    </item>
  </channel>
</rss>

