我正在尝试通过DXF代码过滤PromptEntityOptons/Result,但我找不到一种方法来优雅地做到这一点:现在,我提示一个块,只允许块,读取xdata,如果块没有它,退出,提示用户输入特定的块。
- PromptEntityOptions opt = new PromptEntityOptions("\nPick Valve:");
- opt.SetRejectMessage("\nMust be a block reference...");
- opt.AddAllowedClass(typeof(BlockReference),true);
- // Filter for our Registered App via DXF code here?
- PromptEntityResult res = Active.Editor.GetEntity(opt);
我使用PromptSelectionResult成功过滤xData,如下所示,但这允许用户选择多个对象。
- PromptSelectionResult valveSet = Active.Editor.GetSelection(XData.SelectionFilter(XData.Filter.ValveBlocks));
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复 |