zoukankan      html  css  js  c++  java
  • 选择集

    1、根据图块名过滤

    Dim tksTV(0) As DatabaseServices.TypedValue
    tksTV.SetValue(New DatabaseServices.TypedValue(DatabaseServices.DxfCode.BlockName, tkNames), 0)
    Dim tksFilter As New EditorInput.SelectionFilter(tksTV)
    Dim tksPSR As Autodesk.AutoCAD.EditorInput.PromptSelectionResult
    tksPSR = doc.Editor.GetSelection(tksFilter)

     2、选择图块

    Dim doc As Autodesk.AutoCAD.ApplicationServices.Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
    Dim pso As PromptSelectionOptions = New PromptSelectionOptions()
            With pso
                .RejectObjectsOnLockedLayers = True
                .AllowSubSelections = False
                .MessageForAdding = "选择图块"
                .MessageForRemoval = "选择图块"
            End With
    
            Dim filList() As TypedValue = {New TypedValue(0, "Insert")}
            Dim filter As New SelectionFilter(filList)
            Dim psr As PromptSelectionResult = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.GetSelection(pso, filter)
            If Not psr.Status = PromptStatus.OK Then
                doc.Editor.WriteMessage(vbLf & "命令:")
                Exit Sub
            End If
  • 相关阅读:
    day20:正则表达式
    day19:os模块&shutil模块&tarfile模块
    zynq之TF卡写入常见问题
    verilog之random
    quartus之ram的IP测试
    verilog之readmemb
    verilog之monitor
    verilog之display
    源自opencore的fifo的IP核解析
    veriog之四位全加器
  • 原文地址:https://www.cnblogs.com/rf8862/p/13956390.html
Copyright © 2011-2022 走看看