<?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 Maxscript: How to Continue with another maxscript from Plugin/SimpleObject in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/maxscript-how-to-continue-with-another-maxscript-from-plugin/m-p/8799885#M8369</link>
    <description>&lt;P&gt;I've created a Simpleobject that mimics the grid helper with maxops.autogrid . After this tool has run i wan't to continue with secondary maxscripts. Where/how do i best go about this in the SimpleObject?.&lt;/P&gt;
&lt;P&gt;In the example below i do run.macro after #stop ,but it's not exiting the simpleobject-tool, altough it runs the secondary maxscript.&lt;/P&gt;
&lt;P&gt;I tried using on stop do ... but get no response, so maybe i just need guidance to where to put it... if this is what i should be using.&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;MacroScript TestScript&lt;BR /&gt;category:"TestScripts"&lt;BR /&gt;(&lt;BR /&gt;   print "test"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;plugin simpleObject NewGrid
name:"MyGrid"
classID:#(0x2359f7bb, 0x166fafb8)
category:"MyNewFancyGrid"
(
	parameters main rollout:params
	(
		length type:#float default:0 ui:Glength 
		width type:#float default:0 ui:Gwidth
	)
	rollout params "grid Parameters"
	(
		spinner Glength "length "range:[0,10000,0]
		spinner Gwidth "width "range:[0,10000,0]
	)
on buildmesh do
  (
    NewPlane = createInstance plane length:length lengthsegs:1 widthsegs:1\
	width:width 
    mesh = NewPlane.mesh
  )
	tool create
	(
		on mousePoint click do
		(
			case click of
			(
				1: nodeTM.translation = gridPoint
				2: (#stop; macros.run "TestScripts" "TestScript" )
				--1: coordsys grid (nodeTM.translation = gridPoint)
			)
		)
		on mouseMove click do
		(
			case click of
			(
				2: (width = abs gridDist.x*2; length = abs gridDist.y*2)
			)
		)
	)
)--end plugin 
&lt;/PRE&gt;</description>
    <pubDate>Sat, 18 May 2019 19:28:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-18T19:28:24Z</dc:date>
    <item>
      <title>Maxscript: How to Continue with another maxscript from Plugin/SimpleObject</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/maxscript-how-to-continue-with-another-maxscript-from-plugin/m-p/8799885#M8369</link>
      <description>&lt;P&gt;I've created a Simpleobject that mimics the grid helper with maxops.autogrid . After this tool has run i wan't to continue with secondary maxscripts. Where/how do i best go about this in the SimpleObject?.&lt;/P&gt;
&lt;P&gt;In the example below i do run.macro after #stop ,but it's not exiting the simpleobject-tool, altough it runs the secondary maxscript.&lt;/P&gt;
&lt;P&gt;I tried using on stop do ... but get no response, so maybe i just need guidance to where to put it... if this is what i should be using.&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;MacroScript TestScript&lt;BR /&gt;category:"TestScripts"&lt;BR /&gt;(&lt;BR /&gt;   print "test"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;plugin simpleObject NewGrid
name:"MyGrid"
classID:#(0x2359f7bb, 0x166fafb8)
category:"MyNewFancyGrid"
(
	parameters main rollout:params
	(
		length type:#float default:0 ui:Glength 
		width type:#float default:0 ui:Gwidth
	)
	rollout params "grid Parameters"
	(
		spinner Glength "length "range:[0,10000,0]
		spinner Gwidth "width "range:[0,10000,0]
	)
on buildmesh do
  (
    NewPlane = createInstance plane length:length lengthsegs:1 widthsegs:1\
	width:width 
    mesh = NewPlane.mesh
  )
	tool create
	(
		on mousePoint click do
		(
			case click of
			(
				1: nodeTM.translation = gridPoint
				2: (#stop; macros.run "TestScripts" "TestScript" )
				--1: coordsys grid (nodeTM.translation = gridPoint)
			)
		)
		on mouseMove click do
		(
			case click of
			(
				2: (width = abs gridDist.x*2; length = abs gridDist.y*2)
			)
		)
	)
)--end plugin 
&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 May 2019 19:28:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/maxscript-how-to-continue-with-another-maxscript-from-plugin/m-p/8799885#M8369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-18T19:28:24Z</dc:date>
    </item>
  </channel>
</rss>

