我在界面上弄了个按钮,想让用户点击后加载一个交互工具,选择一个元素。
目前我是使用了一个继承自DgnElementSetTool的子类做的,在_OnElementModify中获取选择集进行操作,但问题是对于参考进来的只读元素无法进行选择,重写了_OnPostLocate函数也无济于事,请问该如何实现?实在不行,就只能让用户先选择了。。。
protected override bool OnDataButton(DgnButtonEvent ev) { if(userstate == CurrentState.none) { HitPath hitPath = DoLocate(ev, true, 1); if (null == hitPath) { return false; } selectedSurface = hitPath.GetHeadElement(); MeshHeaderElement currentmesh = selectedSurface as MeshHeaderElement;