<?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: Moving Sketch Points in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6548448#M19378</link>
    <description>&lt;P&gt;I think the idea in my original response can be used to achieve what you want.&amp;nbsp; After some more thought, I don't think you need a button to do the "apply".&amp;nbsp; Here is the basic approach that I think can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The approach I was suggesting is that during this invocation of the command&amp;nbsp;you maintain a list of the points that have already been moved and the vector values for each one&amp;nbsp;in a global list.&amp;nbsp; In the executePreview event handler you move the current point based on the x, y, and z values in the dialog but you also move all of the points in the global list based on the values you saved with each point.&amp;nbsp; With each preview you're moving all of the points that have been repositioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The list will contain the sketch point and the offset values.&amp;nbsp; You add this data to&amp;nbsp;the list as the user selects points.&amp;nbsp; When a user selects a point, that becomes the "active" point.&amp;nbsp; You'll check to see if it's already in the list and if it is you'll initialize the dialog to use the values saved in the list for that point.&amp;nbsp; Also, when they select a point, if there's already an "active" point you'll add that point and it's offset information&amp;nbsp;to the list.&amp;nbsp;If they clear the selection (click the "x" besides the selection) you'll also add the active point to the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this approach, the points are being updated as the values are edited in the dialog, so there's no need for an apply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing to keep in mind that you have mentioned yet, is that sketch points are defined in the coordinate system of the sketch, which might not always be logical.&amp;nbsp; If you want to move the point relative to the model coordinate system you can use modelToSketchSpace and sketchToModelSpace methods on the sketch to convert from one space to another.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2016 23:23:08 GMT</pubDate>
    <dc:creator>ekinsb</dc:creator>
    <dc:date>2016-09-07T23:23:08Z</dc:date>
    <item>
      <title>Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6541569#M19372</link>
      <description>&lt;P&gt;I've written a control in C++ that lets me select a sketch point, return its XYZ vales and&amp;nbsp;then&amp;nbsp;edit the XYZ values; moving the sketch point to a new position. I need to keep the control open so that I can modify the position of more than one sketch pint........... usually five one at a time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To keep the control active I use the execute preview event and a Boolean value input button to apply the changes to each sketch point. I'm using the input change even to&amp;nbsp;capture the sketch points coordinates as I select each sketch point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem occurs after changing the first sketch point, it move fine but as&amp;nbsp;soon as I select the second sketch point the first point reverts back to its original position......... I just cannot get the change to a sketch point position to persist or activate the execute event from the execute preview event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did read a post explaining that Fusion&amp;nbsp;doesn't have an "Apply" concept and&amp;nbsp;you need to work around the problem&amp;nbsp;with the Boolean value input......... It there any way to&amp;nbsp;make the sketch point changes persist after selection change and after the control is close?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2016 17:01:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6541569#M19372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-04T17:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6541783#M19373</link>
      <description>&lt;P&gt;Each time the execute preview event fires, Fusion aborts whatever was done in the previous event so you can create the new preview. &amp;nbsp;To do what you want to do, each time the user clicks the button to move the currently selected point, you can add the point and the coordinate to a list variable and then save the selected sketch point and the coordinate into a global list. &amp;nbsp;Then in the execute preview you can iterate through the list and move all of the points to the position associated with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because there isn't an "apply" or the ability to save an intermediate step, this also means that if the user clicks "Cancel" none of the moves are saved. &amp;nbsp;Clicked "OK" will save all of the changes as a single undo.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2016 21:43:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6541783#M19373</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-09-04T21:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6542958#M19374</link>
      <description>&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had considered capturing the points and their movement vectors in a list that I could process on the execute event, when the Ok button is pressed.......... But here's the thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sketch points control a sketch curve representing an objects movement path and the idea of my control is to let the user alter the path of the sketch curve and see the results before accepting or rejecting; sketch points jumping back to their original position, on selection change, just doesn't look good and doesn't help with the visualisation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had been hoping that the user could change the position of the sketch points using the Fusion move control, but that control only appears to let you add the distance you want to move and not the destination coordinates. The Fusion move control works great for course adjustment, but&amp;nbsp;needs the user to calculate the translation vector&amp;nbsp;when they require fine control; the idea behind my control was to allow the user to enter a destination and have the control calculate the&amp;nbsp;translation vector for them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there another event handler I could use or&amp;nbsp;am I missing something, like maybe tapping into the Fusion move control? I've been using SolidWorks for the past 20 years and am relatively new to Fusion, so any pointers would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andrew&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 17:30:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6542958#M19374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-05T17:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6546406#M19375</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try also move the cached sketch points to the cached positions in &lt;SPAN&gt;execute&lt;/SPAN&gt;&amp;nbsp;preview event, so that the sketch points won't jump back on selection change. If you still have problem, You'd better&amp;nbsp;provide the sample code to demo the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 09:43:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6546406#M19375</guid>
      <dc:creator>liujac</dc:creator>
      <dc:date>2016-09-07T09:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6546619#M19376</link>
      <description>&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you say cached sketch points, I assume you mean that I need to look at their occurrence; occurrences are something I am still getting used to. I will give it a go and see what happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 12:01:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6546619#M19376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-07T12:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6548091#M19377</link>
      <description>&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just cannot see how to get to any under lying cached data from a selected entity, here's how I am picking up the sketchPoint and using it......... can you help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Ptr&amp;lt;Selection&amp;gt; selection;

class OnManualDefineMovementExecutePreviewEventHander : public adsk::core::CommandEventHandler
{
public:
	void notify(const Ptr&amp;lt;CommandEventArgs&amp;gt;&amp;amp; eventArgs) override
	{		
		if (moveButton-&amp;gt;value())
		{
			if (selection)
			{
				Ptr&amp;lt;SketchPoint&amp;gt; selectedPoint = selection-&amp;gt;entity();
				Ptr&amp;lt;Point3D&amp;gt; geometry = selectedPoint-&amp;gt;worldGeometry();

				double selectedX = geometry-&amp;gt;x();
				double selectedY = geometry-&amp;gt;y();
				double selectedZ = geometry-&amp;gt;z();

				double chosenX = xValueInput-&amp;gt;value();
				double chosenY = yValueInput-&amp;gt;value();
				double chosenZ = zValueInput-&amp;gt;value();

				double requiredX = chosenX - selectedX;
				double requiredY = chosenY - selectedY;
				double requiredZ = chosenZ - selectedZ;

				// Move sketch point
				Ptr&amp;lt;Vector3D&amp;gt; translation = Vector3D::create(requiredX, requiredY, requiredZ);
				selectedPoint-&amp;gt;move(translation);

				eventArgs-&amp;gt;isValidResult(true);
			}
			else
			{
				Application::get()-&amp;gt;userInterface()-&amp;gt;messageBox("Plese select a sketch point");
			}
			// Reset the button's boolean value
			moveButton-&amp;gt;value(false);
		}		
	}
};

class OnDefineMovmenentSelectionChangeEventHandler :public adsk::core::InputChangedEventHandler
{
public:
	void notify(const Ptr&amp;lt;InputChangedEventArgs&amp;gt;&amp;amp; eventArgs) override
	{
		if (eventArgs)
		{
			Ptr&amp;lt;SelectionCommandInput&amp;gt;cmdSelect = eventArgs-&amp;gt;input();
			if (cmdSelect)
			{
				selection = cmdSelect-&amp;gt;selection(0);
				if (selection)
				{
					Ptr&amp;lt;Base&amp;gt; base = selection-&amp;gt;entity();
					string entityName = base-&amp;gt;objectType();

					if (entityName == "adsk::fusion::SketchPoint")
					{
						Ptr&amp;lt;SketchPoint&amp;gt; selectedPoint = selection-&amp;gt;entity();
						Ptr&amp;lt;Point3D&amp;gt; geometry = selectedPoint-&amp;gt;worldGeometry();

						xValueInput-&amp;gt;value(geometry-&amp;gt;x());
						yValueInput-&amp;gt;value(geometry-&amp;gt;y());
						zValueInput-&amp;gt;value(geometry-&amp;gt;z());
					}
				}
				else
				{
					// Clear any selection values
					xValueInput-&amp;gt;value(0);
					yValueInput-&amp;gt;value(0);
					zValueInput-&amp;gt;value(0);
					selection = NULL;
				}
			}
		}
	}
};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:08:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6548091#M19377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-07T20:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6548448#M19378</link>
      <description>&lt;P&gt;I think the idea in my original response can be used to achieve what you want.&amp;nbsp; After some more thought, I don't think you need a button to do the "apply".&amp;nbsp; Here is the basic approach that I think can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The approach I was suggesting is that during this invocation of the command&amp;nbsp;you maintain a list of the points that have already been moved and the vector values for each one&amp;nbsp;in a global list.&amp;nbsp; In the executePreview event handler you move the current point based on the x, y, and z values in the dialog but you also move all of the points in the global list based on the values you saved with each point.&amp;nbsp; With each preview you're moving all of the points that have been repositioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The list will contain the sketch point and the offset values.&amp;nbsp; You add this data to&amp;nbsp;the list as the user selects points.&amp;nbsp; When a user selects a point, that becomes the "active" point.&amp;nbsp; You'll check to see if it's already in the list and if it is you'll initialize the dialog to use the values saved in the list for that point.&amp;nbsp; Also, when they select a point, if there's already an "active" point you'll add that point and it's offset information&amp;nbsp;to the list.&amp;nbsp;If they clear the selection (click the "x" besides the selection) you'll also add the active point to the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this approach, the points are being updated as the values are edited in the dialog, so there's no need for an apply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing to keep in mind that you have mentioned yet, is that sketch points are defined in the coordinate system of the sketch, which might not always be logical.&amp;nbsp; If you want to move the point relative to the model coordinate system you can use modelToSketchSpace and sketchToModelSpace methods on the sketch to convert from one space to another.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 23:23:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6548448#M19378</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-09-07T23:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6548831#M19379</link>
      <description>&lt;P&gt;What I meant was same as Brian suggested. One more thing, you need to set the minimum limit of the selection input to 0, so that the execute preview event is also fired when clear the selection. I wrote the sample code as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;namespace
{
	const std::string commandId_ = "myCommand_";
	const std::string selectionInputId_ = "selectionInput";
	const std::string xValueInputId_ = "xValueCommandInput";
	const std::string yValueInputId_ = "yValueCommandInput";
	const std::string zValueInputId_ = "zValueCommandInput";
	std::map&amp;lt;Ptr&amp;lt;SketchPoint&amp;gt;, Ptr&amp;lt;Point3D&amp;gt;&amp;gt; movedSketchPoints_;

	bool moveSketchPoint(Ptr&amp;lt;SketchPoint&amp;gt; skPt, Ptr&amp;lt;Point3D&amp;gt; newPos)
	{
		if(!skPt || !newPos)
			return false;

		if(newPos-&amp;gt;isEqualTo(skPt-&amp;gt;worldGeometry())) //No need to move
			return false;

		Ptr&amp;lt;Sketch&amp;gt; sk = skPt-&amp;gt;parentSketch();
		if(!sk)
			return false;

		// Transfer the target position from model space to sketch space
		Ptr&amp;lt;Point3D&amp;gt; newPosInSk = sk-&amp;gt;modelToSketchSpace(newPos);
		if(!newPosInSk)
			return false;

		Ptr&amp;lt;Point3D&amp;gt; originalPosInSk = skPt-&amp;gt;geometry();
		if(!originalPosInSk)
			return false;

		Ptr&amp;lt;Vector3D&amp;gt; translation = originalPosInSk-&amp;gt;vectorTo(newPosInSk);
		if(!translation)
			return false;

		return skPt-&amp;gt;move(translation);
	}
}

Ptr&amp;lt;Application&amp;gt; app;
Ptr&amp;lt;UserInterface&amp;gt; ui;

class CommandExecutedHandler : public adsk::core::CommandEventHandler
{
public:
	void notify(const Ptr&amp;lt;CommandEventArgs&amp;gt;&amp;amp; eventArgs) override
	{
		Ptr&amp;lt;Event&amp;gt; firingEvent = eventArgs-&amp;gt;firingEvent();
		if (!firingEvent)
			return;

		Ptr&amp;lt;Command&amp;gt; command = firingEvent-&amp;gt;sender();
		if (!command)
			return;

		Ptr&amp;lt;CommandInputs&amp;gt; inputs = command-&amp;gt;commandInputs();
		if(!inputs)
			return;

		for (auto movedPoint : movedSketchPoints_ )
		{
			moveSketchPoint(movedPoint.first, movedPoint.second);
		}

		eventArgs-&amp;gt;isValidResult(true);

		Ptr&amp;lt;SelectionCommandInput&amp;gt; selInput = inputs-&amp;gt;itemById(selectionInputId_);
		if(!selInput)
			return;

		Ptr&amp;lt;Selection&amp;gt; sel = selInput-&amp;gt;selection(0);
		if(!sel)
			return;

		Ptr&amp;lt;SketchPoint&amp;gt; skPt = sel-&amp;gt;entity();
		if(!skPt)
			return;

		double x = 0.0;
		double y = 0.0;
		double z = 0.0;
		Ptr&amp;lt;ValueCommandInput&amp;gt; xValue = inputs-&amp;gt;itemById(xValueInputId_);
		if(xValue)
			x = xValue-&amp;gt;value();

		Ptr&amp;lt;ValueCommandInput&amp;gt; yValue = inputs-&amp;gt;itemById(yValueInputId_);
		if(yValue)
			y = yValue-&amp;gt;value();

		Ptr&amp;lt;ValueCommandInput&amp;gt; zValue = inputs-&amp;gt;itemById(zValueInputId_);
		if(zValue)
			z = zValue-&amp;gt;value();

		Ptr&amp;lt;Point3D&amp;gt; newPos = adsk::core::Point3D::create(x, y, z);
		if(moveSketchPoint(skPt, newPos))
			movedSketchPoints_[skPt] = newPos;
	}
};

class InputChangedHandler : public adsk::core::InputChangedEventHandler
{
public:
	void notify(const Ptr&amp;lt;InputChangedEventArgs&amp;gt;&amp;amp; eventArgs) override
	{
		Ptr&amp;lt;Event&amp;gt; firingEvent = eventArgs-&amp;gt;firingEvent();
		if (!firingEvent)
			return;

		Ptr&amp;lt;Command&amp;gt; command = firingEvent-&amp;gt;sender();
		if (!command)
			return;

		Ptr&amp;lt;CommandInputs&amp;gt; inputs = command-&amp;gt;commandInputs();
		if(!inputs)
			return;

		Ptr&amp;lt;SelectionCommandInput&amp;gt; cmdInput = eventArgs-&amp;gt;input();
		if(!cmdInput)
			return;

		double x = 0.0;
		double y = 0.0;
		double z = 0.0;
		Ptr&amp;lt;Selection&amp;gt; sel = cmdInput-&amp;gt;selection(0);
		if(sel)
		{
			Ptr&amp;lt;SketchPoint&amp;gt; skPoint = sel-&amp;gt;entity();
			if(!skPoint)
				return;

			Ptr&amp;lt;Point3D&amp;gt; pt = movedSketchPoints_[skPoint];//Get the cached point if exists
			if(!pt)
				pt = skPoint-&amp;gt;worldGeometry();
			if(!pt)
				return;

			x = pt-&amp;gt;x();
			y = pt-&amp;gt;y();
			z = pt-&amp;gt;z();
		}
		
		Ptr&amp;lt;ValueCommandInput&amp;gt; xValue = inputs-&amp;gt;itemById(xValueInputId_);
		if (xValue)
		{
			//xValue-&amp;gt;value(x);
			std::stringstream ss;
			ss &amp;lt;&amp;lt; x &amp;lt;&amp;lt; "cm";
			xValue-&amp;gt;expression(ss.str());
		}

		Ptr&amp;lt;ValueCommandInput&amp;gt; yValue = inputs-&amp;gt;itemById(yValueInputId_);
		if (yValue)
		{
			std::stringstream ss;
			ss &amp;lt;&amp;lt; y &amp;lt;&amp;lt; "cm";
			yValue-&amp;gt;expression(ss.str());
		}

		Ptr&amp;lt;ValueCommandInput&amp;gt; zValue = inputs-&amp;gt;itemById(zValueInputId_);
		if (zValue)
		{
			std::stringstream ss;
			ss &amp;lt;&amp;lt; z &amp;lt;&amp;lt; "cm";
			zValue-&amp;gt;expression(ss.str());
		}
	}
};

class CommandCreatedHandler : public adsk::core::CommandCreatedEventHandler
{
public:
	void notify(const Ptr&amp;lt;CommandCreatedEventArgs&amp;gt;&amp;amp; eventArgs) override
	{
		if (eventArgs)
		{
			Ptr&amp;lt;Command&amp;gt; command = eventArgs-&amp;gt;command();
			if (!command)
				return;

			Ptr&amp;lt;CommandEvent&amp;gt; exec = command-&amp;gt;executePreview();
			if (!exec)
				return;
			exec-&amp;gt;add(&amp;amp;onCommandExecuted_);

			Ptr&amp;lt;InputChangedEvent&amp;gt; inputChanged = command-&amp;gt;inputChanged();
			if (!inputChanged)
				return;
			inputChanged-&amp;gt;add(&amp;amp;onInputChanged_);
			
			// Define the inputs.
			Ptr&amp;lt;CommandInputs&amp;gt; inputs = command-&amp;gt;commandInputs();
			if (!inputs)
				return;

			Ptr&amp;lt;SelectionCommandInput&amp;gt; selInput = inputs-&amp;gt;addSelectionInput(selectionInputId_, "Selection", "Select one sketch point");
			if (selInput)
			{
				selInput-&amp;gt;setSelectionLimits(0, 1);//Set minimum limit to 0 means there is no minimum limit.
				selInput-&amp;gt;addSelectionFilter("SketchPoints");
			}

			inputs-&amp;gt;addValueInput(xValueInputId_, "X", "cm", ValueInput::createByString("0.0 cm"));
			inputs-&amp;gt;addValueInput(yValueInputId_, "Y", "cm", ValueInput::createByString("0.0 cm"));
			inputs-&amp;gt;addValueInput(zValueInputId_, "Z", "cm", ValueInput::createByString("0.0 cm"));
		}
	}
private:
	CommandExecutedHandler onCommandExecuted_;
	InputChangedHandler onInputChanged_;
};
static CommandCreatedHandler onCommandCreated_;&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 06:35:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6548831#M19379</guid>
      <dc:creator>liujac</dc:creator>
      <dc:date>2016-09-08T06:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Sketch Points</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6551024#M19380</link>
      <description>&lt;P&gt;Hi Jack, Hi Brain,&lt;/P&gt;&lt;P&gt;Thank you both for all the help, I just about have Jacks sample up and running. I think there is enough here for me to work with so lets call this one solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 21:15:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/moving-sketch-points/m-p/6551024#M19380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-08T21:15:02Z</dc:date>
    </item>
  </channel>
</rss>

