<?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: Rotation in 2d do not have any effect in the &amp;quot;Previ in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122778#M23254</link>
    <description>I would suggest that you not use the old V~ and W~ variables because they are there only for compatibility reasons.&lt;BR /&gt;
Please replace V~ with SYMB_MIRRORED and replace W~ with SYMB_ROTANGLE and see if it works.&lt;BR /&gt;
Also, note that V~ / SYMB_MIRRORED is checked for in the first line of the script so all the commands in this short script are executed only if the Object is not mirrored (the Mirrored checkbox is not checked in the Dialog).</description>
    <pubDate>Thu, 22 Oct 2009 14:13:24 GMT</pubDate>
    <dc:creator>Laszlo Nagy</dc:creator>
    <dc:date>2009-10-22T14:13:24Z</dc:date>
    <item>
      <title>Rotation in 2d do not have any effect in the "Preview and p.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122771#M23247</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have made an object. The 2d script works fine when the object is open.&lt;BR /&gt;
The display in the Parameters shows a rotated 2d object as it should.&lt;BR /&gt;
I put an instance of this object in the floorplan.&lt;BR /&gt;
I watch the display in the  "Preview and positioning"  and put 45 degrees in the box, but no effect on the 2d symbol in the display. &lt;BR /&gt;
I have deleted and reloaded the object in the Library Manager.&lt;BR /&gt;
----&lt;BR /&gt;
Also I used to be able to open an object when I selected an instance in floorplan, and pressed ctrl + O. But now I only open the filedialog with this command.&lt;BR /&gt;
&lt;BR /&gt;
Maybe some  connection between the problems?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2009 15:36:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122771#M23247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-21T15:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122772#M23248</link>
      <description>I forgot that it was ctrl + Shift + O that opend the object description.&lt;BR /&gt;
This works fine.&lt;BR /&gt;
______________________&lt;BR /&gt;
I hoped that a save and reload of the object would fix the first problem, but no. The rotation code i put into the 2d script still do not seem to have any effect for the 2d view of the object. But in 3d it works allright. So this is still a problem.</description>
      <pubDate>Wed, 21 Oct 2009 18:08:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122772#M23248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-21T18:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122773#M23249</link>
      <description>Make sure you are using the correct command in 2D.&lt;BR /&gt;
For 2D it is .... &lt;FONT color="#f50000"&gt;ROT2 angle&lt;/FONT&gt;&lt;BR /&gt;
For 3D it is .... &lt;FONT color="#f50000"&gt;ROTx angle &lt;/FONT&gt;.... or .... &lt;FONT color="#f50000"&gt;ROTy angle &lt;/FONT&gt;.... or .... &lt;FONT color="#f50000"&gt;ROTz angle&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 22 Oct 2009 02:39:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122773#M23249</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-10-22T02:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122774#M23250</link>
      <description>I use ROT2 w~ in the 2d script. It works fine in the object description parameters. When I press the first button below the display the 2d drawing rotates allright. But not in Settings of the instance of the object I put in the floorplan. But I have saved and reloaded the object.</description>
      <pubDate>Thu, 22 Oct 2009 07:55:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122774#M23250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-22T07:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122775#M23251</link>
      <description>The &lt;FONT color="#ff0000"&gt;W~&lt;/FONT&gt; is the old global variable name for &lt;FONT color="#ff0000"&gt;SYMB_ROTANGLE&lt;/FONT&gt;.&lt;BR /&gt;
SYMB_ROTANGLE is the value in the info box for the object rotation as you place it on plan.&lt;BR /&gt;
&lt;BR /&gt;
If you want to use that to rotate your object then there is no need to script anything.&lt;BR /&gt;
Just rotate the object as needed in the info box or object settings dialogue.&lt;BR /&gt;
&lt;BR /&gt;
How ever if you want an object that can not be rotated then you can add &lt;FONT color="#ff0000"&gt;ROT -W~&lt;/FONT&gt; to your 2D script.&lt;BR /&gt;
This is often just used for the text parts of an object so the text is always readable even when the object is rotated.&lt;BR /&gt;
&lt;BR /&gt;
What you are doing in your object is rotating it by as much again as what you rotate the object by when changing the rotation angle in the info box.&lt;BR /&gt;
ie 2 times the rotation angle (if 45° then you are rotating 90° which is possibly why you don't notice the change if your object is say a square).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If you want a user parameter for the object (or parts of it) then create an angle type parameter (ie rot_ang) and use this in the script.&lt;BR /&gt;
ie &lt;FONT color="#ff0000"&gt;ROT2 rot_ang&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
Not sure if I am helping or confusing you more?&lt;BR /&gt;
If you can give us some more info on what you are trying to script then we can help some more.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 22 Oct 2009 08:38:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122775#M23251</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-10-22T08:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122776#M23252</link>
      <description>This is the code in the 2d script of the object I've made.&lt;BR /&gt;
The display in the Parameters behave as expected when I change the rotation angle. But the problem occurs in the instance of an object. &lt;BR /&gt;
&lt;BR /&gt;
IF V~=0 THEN &lt;BR /&gt;
	ROT2 -W~&lt;BR /&gt;
	RECT2 -B/2,-A/2, B/2, A/2&lt;BR /&gt;
	&lt;BR /&gt;
	PEN 20&lt;BR /&gt;
	HOTSPOT2 0,0&lt;BR /&gt;
	HOTSPOT2 -B/2, A/2&lt;BR /&gt;
	HOTSPOT2 B/2, A/2&lt;BR /&gt;
	HOTSPOT2 -B/2,-A/2&lt;BR /&gt;
	HOTSPOT2 B/2,-A/2&lt;BR /&gt;
ENDIF</description>
      <pubDate>Thu, 22 Oct 2009 11:56:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122776#M23252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-22T11:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122777#M23253</link>
      <description>Here is the Preview an positioning for the object that shows that the object do not rotate when I change the angle.&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/68811i1F6E440E3F2BA41A/image-size/large?v=v2&amp;amp;px=999" border="0" alt="2dScript.jpg" title="2dScript.jpg" /&gt;</description>
      <pubDate>Thu, 22 Oct 2009 12:09:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122777#M23253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-22T12:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122778#M23254</link>
      <description>I would suggest that you not use the old V~ and W~ variables because they are there only for compatibility reasons.&lt;BR /&gt;
Please replace V~ with SYMB_MIRRORED and replace W~ with SYMB_ROTANGLE and see if it works.&lt;BR /&gt;
Also, note that V~ / SYMB_MIRRORED is checked for in the first line of the script so all the commands in this short script are executed only if the Object is not mirrored (the Mirrored checkbox is not checked in the Dialog).</description>
      <pubDate>Thu, 22 Oct 2009 14:13:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122778#M23254</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2009-10-22T14:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122779#M23255</link>
      <description>Since rotate is hardwired and doesnt need to be scripted when you add rot2 -W~ you are effectively adding and subtracting the same command and hence ending up in the same place. ie no rotation. &lt;BR /&gt;
&lt;BR /&gt;
The code you use is useful to get text associated with a symbol to not rotate even thought the main object has been. (there are other issues with that concept but wont got there)</description>
      <pubDate>Thu, 22 Oct 2009 21:58:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122779#M23255</guid>
      <dc:creator>Aussie John</dc:creator>
      <dc:date>2009-10-22T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122780#M23256</link>
      <description>&lt;BLOCKQUOTE&gt;Anne wrote:&lt;BR /&gt;This is the code in the 2d script of the object I've made.&lt;BR /&gt;
The display in the Parameters behave as expected when I change the rotation angle. But the problem occurs in the instance of an object. &lt;BR /&gt;
&lt;BR /&gt;
IF V~=0 THEN &lt;BR /&gt;
	ROT2 -W~&lt;BR /&gt;
	RECT2 -B/2,-A/2, B/2, A/2&lt;BR /&gt;
	&lt;BR /&gt;
	PEN 20&lt;BR /&gt;
	HOTSPOT2 0,0&lt;BR /&gt;
	HOTSPOT2 -B/2, A/2&lt;BR /&gt;
	HOTSPOT2 B/2, A/2&lt;BR /&gt;
	HOTSPOT2 -B/2,-A/2&lt;BR /&gt;
	HOTSPOT2 B/2,-A/2&lt;BR /&gt;
ENDIF&lt;/BLOCKQUOTE&gt;

What your code is saying is - &lt;BR /&gt;
IF V~=0 THEN &lt;FONT color="#ff0000"&gt;If object is not mirrored&lt;/FONT&gt;&lt;BR /&gt;
	ROT2 -W~ &lt;FONT color="#ff0000"&gt;Rotate by the negative of the rotation angle (ie undo the rotate)&lt;/FONT&gt;	&lt;BR /&gt;
                RECT2 -B/2,-A/2, B/2, A/2 &lt;FONT color="#ff0000"&gt;Draw a rectangle&lt;/FONT&gt;	&lt;BR /&gt;
	PEN 20&lt;BR /&gt;
	HOTSPOT2 0,0 &lt;FONT color="#ff0000"&gt;Add some hotspots&lt;/FONT&gt;&lt;BR /&gt;
	HOTSPOT2 -B/2, A/2&lt;BR /&gt;
	HOTSPOT2 B/2, A/2&lt;BR /&gt;
	HOTSPOT2 -B/2,-A/2&lt;BR /&gt;
	HOTSPOT2 B/2,-A/2&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;FONT color="#ff0000"&gt;If object is mirrored then do nothing (no rectangle or hotspots).&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
If you want to stop an object from rotating then what you have works as you have found out.&lt;BR /&gt;
&lt;BR /&gt;
If you want to stop an object from being mirrored then - &lt;BR /&gt;
&lt;FONT color="#ff0000"&gt;IF SYMB_MIRRORED = 1 THEN&lt;BR /&gt;
MUL2 -1, 0&lt;BR /&gt;
ENDIF&lt;BR /&gt;
RECT2 -B/2,-A/2, B/2, A/2&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
You won't notice much happening though with just a rectangle.&lt;BR /&gt;
&lt;BR /&gt;
Substitute the RECT2 command above with this to see what happens when you try to mirror.&lt;BR /&gt;
&lt;FONT color="#ff0000"&gt;set fill "Empty Fill"&lt;BR /&gt;
poly2_b{3}       8,      3,      1,      0, &lt;BR /&gt;
                   0,            0,            1,            0,            0,            1, &lt;BR /&gt;
                   0,         -0.1,      1, &lt;BR /&gt;
                 0.5,         -0.1,      1, &lt;BR /&gt;
        0.4896921399734, -0.3217339824516,      1, &lt;BR /&gt;
                 0.8,            0,      1, &lt;BR /&gt;
                 0.5,          0.3,      1, &lt;BR /&gt;
                 0.5,          0.1,      1, &lt;BR /&gt;
                   0,          0.1,      1, &lt;BR /&gt;
                   0,         -0.1,      1&lt;BR /&gt;
hotspot2            0,         -0.1&lt;BR /&gt;
hotspot2          0.5,         -0.1&lt;BR /&gt;
hotspot2 0.4896921399734, -0.3217339824516&lt;BR /&gt;
hotspot2          0.8,            0&lt;BR /&gt;
hotspot2          0.5,          0.3&lt;BR /&gt;
hotspot2          0.5,          0.1&lt;BR /&gt;
hotspot2            0,          0.1&lt;BR /&gt;
hotspot2            0,         -0.1&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
It won't mirror.&lt;BR /&gt;
Now comment out or delete the MUL2 command and it will mirror.&lt;BR /&gt;
&lt;BR /&gt;
There is no need to add any rotate commands in your script if you are going to be using the object's rotation angle.&lt;BR /&gt;
This is all handled automatically.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 23 Oct 2009 01:59:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122780#M23256</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-10-23T01:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rotation in 2d do not have any effect in the "Previ</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122781#M23257</link>
      <description>Now I've deleted the test and the rotation command. And now it works correctly. So thanks for all your help &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/E&gt;</description>
      <pubDate>Fri, 23 Oct 2009 07:50:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Rotation-in-2d-do-not-have-any-effect-in-the-quot-Preview-and-p/m-p/122781#M23257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-23T07:50:32Z</dc:date>
    </item>
  </channel>
</rss>

