Tool name not found


https://www.nevron.com/Forum/Topic8586.aspx
Print Topic | Close Window

By Craig Browder - 10 Years Ago
We have the following in our code. But when it executes, the tool name is not found. Can someone please take a look at the below code and help us identify what may be causing the issue?

Thanks!

Craig

// replace the default drag drop target tool with your own one
// to extend the drop capabilities of the view
NTool tool = nDrawingView1.Controller.Tools.GetToolByName(NDWFR.ToolDragDropTarget); //NDWFR.ToolDragDropTarget is not found and tool is null
//int index = 24; //TESTING
int index = nDrawingView1.Controller.Tools.IndexOf(tool); //since tool is null, index value is -1
if(tool!=null)
nDrawingView1.Controller.Tools.Remove(tool);
nDrawingView1.GlobalVisibility.ShowPorts = false;