通过过滤器选择对象
来源:互联网 发布:ipad翻墙软件 编辑:程序博客网 时间:2024/06/07 07:49
Imports ZwSoft.ZwCAD.ApplicationServices
Imports ZwSoft.ZwCAD.DatabaseServices
Imports ZwSoft.ZwCAD.Geometry
Imports ZWCAD
Imports ZwSoft.ZwCAD.EditorInput
Public Class Class1
<CommandMethod("AutoMerge")> _
Public Sub AutoMerge()
Dim ZcDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim ZcDB As Database = ZcDoc.Database
Dim ZcEd As Editor = ZcDoc.Editor
Dim tvs As TypedValue() = New TypedValue(0) {New TypedValue(CInt(DxfCode.Start), "ACAD_TABLE")}
Dim sf As New SelectionFilter(tvs)
Dim psr As PromptSelectionResult = ZcEd.SelectAll(sf)
If psr.Status = PromptStatus.OK AndAlso psr.Value.Count > 0 Then
Using ZcTrans As Transaction = ZcDB.TransactionManager.StartTransaction()
For Each obj As SelectedObject In psr.Value
Dim dbObj As DBObject = ZcTrans.GetObject(obj.ObjectId, OpenMode.ForWrite)
Dim tbl As Table = TryCast(dbObj, Table)
Dim columns As Int16 = tbl.NumColumns
tbl.MergeCells(New TableRegion(0, 0, 0, columns - 1))
Next
ZcTrans.Commit()
End Using
End If
End Sub
End Class
‘多个过滤条件
'Dim tvs As TypedValue() = New TypedValue() {New TypedValue(CInt(DxfCode.[Operator]), "<or"), New TypedValue(CInt(DxfCode.[Operator]), "<and"), New TypedValue(CInt(DxfCode.LayerName), "0"), New TypedValue(CInt(DxfCode.Start), "LINE"), New TypedValue(CInt(DxfCode.[Operator]), "and>"), New TypedValue(CInt(DxfCode.[Operator]), "<and"), _
' New TypedValue(CInt(DxfCode.Start), "CIRCLE"), New TypedValue(CInt(DxfCode.[Operator]), ">="), New TypedValue(CInt(DxfCode.Real), 10.0), New TypedValue(CInt(DxfCode.[Operator]), "and>"), New TypedValue(CInt(DxfCode.[Operator]), "or>")}
'Dim sf As New SelectionFilter(tvs)
'Dim psr As PromptSelectionResult = ed.SelectAll(sf)
- 通过过滤器选择对象
- 通过“选择对象控件”设置选择过滤器
- JQuery选择过滤器大全
- JQuery选择过滤器
- JQuery选择过滤器大全
- JQuery选择过滤器
- JQuery选择过滤器
- jquery选择过滤器
- JQuery选择过滤器
- JQuery选择过滤器
- JQuery选择过滤器
- Jquery层级选择过滤器
- HTML5开发之通过文件对象选择文件
- jsp中过滤器选择过滤器的写法
- Demo-jQuery常用选择过滤器
- 通过过滤器设置字符编码
- 过滤器的使用,这个方法可以在选择对象时候过滤到其他的只选自己想要的类型。
- jQuery表单对象属性过滤器
- 只有dll,生成lib、def等中间文件
- java.net.URLConnection
- BoneCP主要配置参数
- websocket最新协议的握手实现
- POJ 2136
- 通过过滤器选择对象
- php类属性成员和方法重载
- posgresql postgres_fdw使用
- lua 匹配
- css !important用法以及CSS样式使用优先级判断
- C#中操作Excel单元格合并
- 数据库中空字符串和NULL值两个概念的区别
- HttpOnly介绍以及防止XSS攻击时的作用(转)
- 埋头苦干