zoukankan      html  css  js  c++  java
  • AutoCAD.net(二):筛选

    1.过滤块
                PromptSelectionOptions pOptions = new PromptSelectionOptions();
                TypedValue[] filList 
    =    new TypedValue((int)DxfCode.Start, "INSERT") };
                SelectionFilter filter 
    = new SelectionFilter(filList);
                PromptSelectionResult res 
    = ed.GetSelection(pOptions, filter);//***
                if (res.Status != PromptStatus.OK) return;
                Autodesk.AutoCAD.EditorInput.SelectionSet SS 
    = res.Value;
                ObjectId[] idArray 
    = SS.GetObjectIds();

    2.过滤多线
                TypedValue[] filList =    new TypedValue((int)DxfCode.Start, "LWPolyLine") };
                SelectionFilter filter 
    = new SelectionFilter(filList);
                PromptSelectionResult res 
    = ed.SelectAll(filter);//***
                           if (res.Status != PromptStatus.OK) return;
                Autodesk.AutoCAD.EditorInput.SelectionSet SS 
    = res.Value;
                ObjectId[] idArray 
    = SS.GetObjectIds();
  • 相关阅读:
    OC面向对象—封装
    OC内存管理
    OC方法和文件编译
    OC语言基础知识
    OC语言前期准备
    C语言指针基础
    C语言字符串
    C语言数组
    C语言内存分析
    C语言函数
  • 原文地址:https://www.cnblogs.com/wf225/p/1038195.html
Copyright © 2011-2022 走看看