<?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: Module Development : Simple Way to Disable Snap to Grid in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13657830#M96409</link>
    <description>&lt;P&gt;Yeah, the conveyor objects override onDrag() and return 1 so it doesn't do the normal behavior. Basically you'd add an onDrag() like this to your object:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;if (!draginfo(DRAG_INFO_BUTTON_STATE)) // mouse wheel
	return 0; // let view zoom

Vec3 diff(draginfo(DRAG_INFO_DX), draginfo(DRAG_INFO_DY), draginfo(DRAG_INFO_DZ));

b_spatialx += diff.x;
b_spatialy += diff.y;
b_spatialz += diff.z;

return 1;&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 30 May 2025 12:47:40 GMT</pubDate>
    <dc:creator>Matthew_Gillespie</dc:creator>
    <dc:date>2025-05-30T12:47:40Z</dc:date>
    <item>
      <title>Module Development : Simple Way to Disable Snap to Grid</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13655433#M96387</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;Is there an easy way to prevent an object from snapping to the grid in C++? Would it be done in onDrag()?&lt;/P&gt;&lt;P&gt;How the conveyor doesn't snap to the grid is what I'm looking for.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 05:28:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13655433#M96387</guid>
      <dc:creator>jstevensE9YZD</dc:creator>
      <dc:date>2025-05-29T05:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Module Development : Simple Way to Disable Snap to Grid</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13655488#M96388</link>
      <description>&lt;P&gt;If you set a location by script, such an object does not snap to the grid. Only objects you drag into your model are snapping to the grid. Or objects that you move by mouse snaps to the grid. Currently I have not FlexSim opened to look into the tree to find the node myself. It should be an attribute (node) of a view tree of the window you drag objects onto. It is &lt;A href="https://docs.flexsim.com/en/25.1/Reference/DeveloperAdvancedUser/GUIs/GUIViewAttributes/GUIViewAttributes.html#viewsnaptogrid" target="_self"&gt;mentioned&lt;/A&gt; for example in manual for custom graphical user interface (GUI). You find it in the view tree of FlexSim in active branch.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 06:11:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13655488#M96388</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2025-05-29T06:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Module Development : Simple Way to Disable Snap to Grid</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13656208#M96398</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/17307626"&gt;@joerg_vogel_HsH&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I mentioned onDrag() was that I want to drag a specific object around a view and not have it snap to the grid. I don't want to turn off snap to grid for the rest of the objects.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 13:52:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13656208#M96398</guid>
      <dc:creator>jstevensE9YZD</dc:creator>
      <dc:date>2025-05-29T13:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Module Development : Simple Way to Disable Snap to Grid</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13657830#M96409</link>
      <description>&lt;P&gt;Yeah, the conveyor objects override onDrag() and return 1 so it doesn't do the normal behavior. Basically you'd add an onDrag() like this to your object:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;if (!draginfo(DRAG_INFO_BUTTON_STATE)) // mouse wheel
	return 0; // let view zoom

Vec3 diff(draginfo(DRAG_INFO_DX), draginfo(DRAG_INFO_DY), draginfo(DRAG_INFO_DZ));

b_spatialx += diff.x;
b_spatialy += diff.y;
b_spatialz += diff.z;

return 1;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 May 2025 12:47:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13657830#M96409</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2025-05-30T12:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Module Development : Simple Way to Disable Snap to Grid</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13657856#M96410</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/17307556"&gt;@Matthew_Gillespie&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;That was exactly what I was looking for, glad it was so simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 13:05:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/module-development-simple-way-to-disable-snap-to-grid/m-p/13657856#M96410</guid>
      <dc:creator>jstevensE9YZD</dc:creator>
      <dc:date>2025-05-30T13:05:03Z</dc:date>
    </item>
  </channel>
</rss>

