<?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 This might be useful info in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Help-with-fixing-some-text-position/m-p/246235#M1181</link>
    <description>Just something that i thing is important info to find this solution.&lt;BR /&gt;
When I rotate the object the text remains on the exact same position. I then need to move it to where I want (in this case the position on the original image of the post).&lt;BR /&gt;
&lt;BR /&gt;
&lt;IMG src="https://dl3.pushbulletusercontent.com/iySP0SXBfKaGVVqwMehVhKMBr5XpUbge/image.png" /&gt;</description>
    <pubDate>Sun, 17 May 2020 15:38:10 GMT</pubDate>
    <dc:creator>matleonii</dc:creator>
    <dc:date>2020-05-17T15:38:10Z</dc:date>
    <item>
      <title>Help with fixing some text position</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Help-with-fixing-some-text-position/m-p/246234#M1180</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hey guys, this is the first GDL object I've made and it pretty much worked fine, except for this thing:&lt;BR /&gt;
&lt;BR /&gt;
I need this 3d object to have a specific 2d representation(it the object to represent electrical fixtures in the plan view), in which each part of it should have a text associated with it.&lt;BR /&gt;
I've made it in a way that it was possible to move the text around, so that I could position it in the best spot it the plan view and that it would stay in the proportional position in different scales.&lt;BR /&gt;
&lt;BR /&gt;
I worked fine(as in the fist row of the image)! BUT only as soon as I rotate the object it messed with everything(the second row). The image bellow will show what I mean.&lt;BR /&gt;
&lt;BR /&gt;
&lt;IMG src="https://dl3.pushbulletusercontent.com/fUNDoZLiVmz5ck0rCMjyQgjNQdYsxxzG/bloco%20el%C3%A9trica.jpg" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
This is the code I used for each one of the texts (1,2 and 3):&lt;BR /&gt;

&lt;PRE&gt;! ------------------------------------------------------------------------------
! Text Rotation - Readable / Always Horizontal / Align with Symbol
! ------------------------------------------------------------------------------
r = request ("View_Rotangle", "", _angleViewRot)

! Actual rotation of the 2D symbol:	
_totalRotate	= (SYMB_ROTANGLE + _angleViewRot) MOD 360

! Count the number of transformations of the 
! coordinate system in different cases
_nTrans = 0					  
 
if iTypeTextRotation = 2 then					! Readable
    if (_totalRotate &amp;gt; (90 + EPS) &amp;amp; _totalRotate &amp;lt; (270 + EPS)) then
        rot2 180
        _nTrans = _nTrans + 1
    endif
else
    if iTypeTextRotation = 1 then				! Horizontal
        rot2 _totalRotate * (SYMB_MIRRORED - not(SYMB_MIRRORED))
        _nTrans = _nTrans + 1
    endif
endif

! ------------------------------------------------------------------------------------------------
! Text Position - USING "GLOB_SCALE/50" TO MAKE POSITION THE SAME ON ALL SCALES
! THE "/50" IS BECAUSE I WAS DRAWING ON THE 1:50 SCALE AND NEEDED THING TO BE ON THAT PROPORTIONS
! ------------------------------------------------------------------------------------------------

ADD2 0.06*GLOB_SCALE/50, 0.13*GLOB_SCALE/50

! ------------------------------------------------------------------------------
! MOVABLE HOTSPOTS
! ------------------------------------------------------------------------------

unID=1
!_________________________moving it horizontally
hotspot2 0,verti2,unID,horz2,1+128 : unID=unID+1
hotspot2 -1,verti2,unID,horz2,3 : unID=unID+1
hotspot2 horz2,verti2,unID,horz2,2+256 : unID=unID+1

!_________________________moving it vertically
hotspot2 horz2,0,unID,verti2,1+128 : unID=unID+1
hotspot2 horz2,-1,unID,verti2,3 : unID=unID+1
hotspot2 horz2,verti2,unID,verti2,2+256 : unID=unID+1

DEL 1

! ------------------------------------------------------------------------------
! TEXT ITSELF
! ------------------------------------------------------------------------------

TEXT2 horz2+0.05*GLOB_SCALE/50,verti2+0.1*GLOB_SCALE/50,txti2



! ------------------------------------------------------------------------------
! Delete transformation after Text Rotation
! ------------------------------------------------------------------------------
del _nTrans&lt;/PRE&gt;

&lt;BR /&gt;
Is that a way of getting it right, even when I rotate the object. It is probably something silly, as this is my first GDL project. &lt;BR /&gt;
&lt;BR /&gt;
Thanks for the time folks! hope some of you can help me with this.&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 17 May 2020 15:34:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Help-with-fixing-some-text-position/m-p/246234#M1180</guid>
      <dc:creator>matleonii</dc:creator>
      <dc:date>2020-05-17T15:34:50Z</dc:date>
    </item>
    <item>
      <title>This might be useful info</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Help-with-fixing-some-text-position/m-p/246235#M1181</link>
      <description>Just something that i thing is important info to find this solution.&lt;BR /&gt;
When I rotate the object the text remains on the exact same position. I then need to move it to where I want (in this case the position on the original image of the post).&lt;BR /&gt;
&lt;BR /&gt;
&lt;IMG src="https://dl3.pushbulletusercontent.com/iySP0SXBfKaGVVqwMehVhKMBr5XpUbge/image.png" /&gt;</description>
      <pubDate>Sun, 17 May 2020 15:38:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Help-with-fixing-some-text-position/m-p/246235#M1181</guid>
      <dc:creator>matleonii</dc:creator>
      <dc:date>2020-05-17T15:38:10Z</dc:date>
    </item>
  </channel>
</rss>

