Why would a user not have a 3D View open when using this tool, or switch the 3D View to the Link Editor in the middle of using this tool
Nevertheless, to test this scenario...
Start this process by adding a Dimension, select first Point(s)
Widget is active and Point(s) are selected
Switch the 3D View to the LE and back to the 3D View
Point(s) are selected, Status message is showing, and the Widget's cursor is gone but you can still pick with the Mouse (What?!)
So, I am proposing a little more than just a return
Code: Select all
var util = System.CreateDO("Clintons3D Package/Utility functions");
var dataNode = "Scripts/CustomCommands/PickSelect/data";
if(Node.SubObjectCount("/D3DView")==0) {
params.SetTerminationFlag()
util.Delete("/Widgets/Active Widgets Layer2/Markers");
util.ClearStatusMessage(0)
return
}