<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="/feed.php">
        <title>Documentation Center public:software:dazstudio:4:referenceguide:scripting:api_reference:samples:nodes:node_align</title>
        <description></description>
        <link>/</link>
        <image rdf:resource="/lib/tpl/dazdoccenter/images/favicon.ico" />
       <dc:date>2026-04-12T02:55:45+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_align/start"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="/lib/tpl/dazdoccenter/images/favicon.ico">
        <title>Documentation Center</title>
        <link>/</link>
        <url>/lib/tpl/dazdoccenter/images/favicon.ico</url>
    </image>
    <item rdf:about="/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_align/start">
        <dc:format>text/html</dc:format>
        <dc:date>2017-12-07T22:40:14+00:00</dc:date>
        <title>Node Align</title>
        <link>/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_align/start</link>
        <description>
&lt;h1 id=&quot;node_align&quot;&gt;Node Align&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Below is an example demonstrating how to adjust the positions of nodes in the scene in order to align them according to settings that correspond to those found on the &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/interface/panes/align/start&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:interface:panes:align:start&quot;&gt;Align (WIP)&lt;/a&gt; pane, via script.
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&quot;api_areas_of_interest&quot;&gt;API Areas of Interest&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object_q&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:object_q&quot;&gt;QObject&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/app_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:app_dz&quot;&gt;DzApp&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/base_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:base_dz&quot;&gt;DzBase&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level3&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:scene_dz&quot;&gt;DzScene&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level3 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/element_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:element_dz&quot;&gt;DzElement&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level4&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/node_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:node_dz&quot;&gt;DzNode&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/nodealigner_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:nodealigner_dz&quot;&gt;DzNodeAligner&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/messagebox_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:messagebox_dz&quot;&gt;DzMessageBox&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/undostack_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:undostack_dz&quot;&gt;DzUndoStack&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/error_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:error_dz&quot;&gt;DzError&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:object&quot;&gt;Object&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/array&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:array&quot;&gt;Array&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/number&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:number&quot;&gt;Number&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/boolean&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:boolean&quot;&gt;Boolean&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/string&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:string&quot;&gt;String&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;h2 id=&quot;example&quot;&gt;Example&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;div class=&quot;wrap_center wrap_round wrap_download plugin_wrap&quot; style=&quot;width: 90%;&quot;&gt;&lt;ul&gt;&lt;li&gt;License: &lt;a href=&quot;http://creativecommons.org/licenses/by/3.0/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://creativecommons.org/licenses/by/3.0/&quot; rel=&quot;nofollow noopener&quot;&gt;CC Attribution 3.0 Unported&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Click the name of the example below to save it as a file&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;-webkit-user-select: none;-webkit-touch-callout: none;-moz-user-select: none;-ms-user-select: none;user-select: none;&quot;&gt;&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_align/start?codeblock=0&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_dsa&quot;&gt;Node_Align.dsa&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// DAZ Studio version 4.10.0.122 filetype DAZ Script&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Define an anonymous function;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// serves as our main loop,&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// limits the scope of variables&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;coMULTI&quot;&gt;/*********************************************************************/&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// String : A function for retrieving a translation if one exists&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sText &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// If the version of the application supports qsTr()&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;typeof&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; qsTr &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;undefined&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span class=&quot;co1&quot;&gt;// Return the translated (if any) text&lt;/span&gt;
			&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; qsTr&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sText &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;co1&quot;&gt;// Return the original text&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; sText&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;coMULTI&quot;&gt;/*********************************************************************/&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// Define common message variables&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; sTitle &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Selection Error&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; sMessage &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;You must select one or more nodes to perform this action.&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; sButton &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;amp;OK&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Get the selected nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; aNodes &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; Scene&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getSelectedNodeList&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// Get the number of nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; nNodes &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; aNodes&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// If we do not have nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; nNodes &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;		
		&lt;span class=&quot;co1&quot;&gt;// Alert the user&lt;/span&gt;
		MessageBox&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;warning&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sMessage&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; sTitle&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; sButton&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;co1&quot;&gt;// We are done...&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Create a node aligner&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oAligner &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; DzNodeAligner&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Declare working variables&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; nCode&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oNode&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Iterate over the nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; nNodes&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Get the 'current' node&lt;/span&gt;
		oNode &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; aNodes&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; i &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Add the node to the aligner; capture errors&lt;/span&gt;
		nCode &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addNode&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; oNode &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// If there was an error&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; nCode &lt;span class=&quot;sy0&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;nu12&quot;&gt;0x00000000&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span class=&quot;co1&quot;&gt;// Provide feedback&lt;/span&gt;
			print&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; getErrorMessage&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; nCode &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Set the X axis options&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setXAlign&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; DzNodeAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;StackXLefts&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setXUnits&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; DzNodeAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;UnitsFT&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setXUseInterval&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Set the Y axis options&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setYAlign&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; DzNodeAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;StackYTops&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setYUnits&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; DzNodeAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;UnitsFT&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setYUseInterval&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Set the Z axis options&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setZAlign&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; DzNodeAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;StackZBacks&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setZUnits&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; DzNodeAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;UnitsFT&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setZUseInterval&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// If alignment is possible&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;canAlign&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Start capturing changes&lt;/span&gt;
		beginUndo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Perorm the alignment; if it is not successful&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;oAligner&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;doAlign&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span class=&quot;co1&quot;&gt;// Cancel/Purge the collection of changes&lt;/span&gt;
			cancelUndo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// If alignment is successful&lt;/span&gt;
		&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span class=&quot;co1&quot;&gt;// Add the undo to the stack&lt;/span&gt;
			acceptUndo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Align Nodes&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// If alignment is not possible&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;//&lt;/span&gt;
		sMessage &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;The current selection, with the current options, cannot be aligned.&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Alert the user&lt;/span&gt;
		MessageBox&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;warning&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sMessage&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; sTitle&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; sButton&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Finalize the function and invoke&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
</rdf:RDF>
