zoukankan      html  css  js  c++  java
  • 选择对象时添加选项(KeyWord)

            Dim doc As Autodesk.AutoCAD.ApplicationServices.Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
            Dim ed As Autodesk.AutoCAD.EditorInput.Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
    
    ss1:
            Dim CurOption1 As PromptSelectionOptions = New PromptSelectionOptions()
            With CurOption1
                .RejectObjectsOnLockedLayers = True
                .AllowSubSelections = False
    
                .Keywords.Add("Delete", "Cl", "清除标注信息(Cl)")
                .Keywords.Add("Add", "Ad", "添加标注信息(Ad)")
                .Keywords.Add("RotateUCS", "Ro", "旋转坐标系(Ro)")
    
                .MessageForAdding = "请选择标注 或" & CurOption1.Keywords.GetDisplayString(True)
                .MessageForRemoval = "请选择标注 或" & CurOption1.Keywords.GetDisplayString(True)
            End With
    
            Dim filList() As TypedValue = {New TypedValue(0, "DIMENSION")} '{New TypedValue(DxfCode.Start, "text")}
            Dim filter As New SelectionFilter(filList)
    
            '' Adds the event handler for keyword input
            AddHandler CurOption1.KeywordInput, AddressOf SelectionKeywordInputHandler
    
            Dim prEntRes As PromptSelectionResult = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.GetSelection(CurOption1, filter)


      Private Sub SelectionKeywordInputHandler(ByVal sender As Object, ByVal eSelectionInput As SelectionTextInputEventArgs)
            '''
        End Sub


  • 相关阅读:
    tyvjP1078
    红黑树笔记
    红黑树插入代码学习
    tyvjP1082找朋友
    牛棚回声USACO OCT09 3RD
    每日参悟
    全排列学习
    学习1.2
    学习笔记1.1
    学习笔记1.3
  • 原文地址:https://www.cnblogs.com/rf8862/p/12356505.html
Copyright © 2011-2022 走看看