Hi @tetsuya_miwa ,
Could you please take a look at this below code?
[Plugin("MyInputPlugin", "ADSK")]
public class Class1 : InputPlugin
{
public override bool MouseMove(View view, KeyModifiers modifiers, int x, int y, double timeOffset)
{
if (isMeasurementToolRunning())
{
return false;
}
else
{
//Do What you want to do when the mouse moves
return true;
}
}
private bool isMeasurementToolRunning()
{
var activeTool = Autodesk.Navisworks.Api.Application.ActiveDocument.Tool;
// Define a HashSet of measurement tools for fast lookup
var measurementTools = new HashSet<Tool>
{
Tool.MeasureAccumulate,
Tool.MeasureAngle,
Tool.MeasureArea,
Tool.MeasurePointLine,
Tool.MeasurePointToMultiplePoints,
Tool.MeasurePointToPoint,
Tool.MeasureSingle
};
// Check if active tool is in the set of measurement tools
return activeTool != null && measurementTools.Contains(activeTool);
}
}
Naveen Kumar T
Developer Technical Services
Autodesk Developer Network