CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

GetIsMergeAllEnabled Method (ActiveX)

2023-1-4 07:45| 发布者: admin| 查看: 752| 评论: 0|来自: AutoCAD

摘要: 获取“全部合并”属性的值。

获取“全部合并”属性的值。

支持的平台:仅窗口

签名

工 务 局:

RetVal = object.GetIsMergeAllEnabled(StringCellStyle)
对象

类型:表格样式

此方法适用的对象。

字符串单元格样式

访问:仅输入

类型:字符串

单元格样式名称。

返回值(RetVal)

类型:布尔

  • True:启用单元格样式“全部合并”属性。
  • False:未启用单元格样式“全部合并”属性。

言论

没有额外的评论。

例子

工 务 局:

Sub Example_EnableMergeAll()
    ' This example creates a TableStyle object and sets values for
    ' the style cell merging.
    
    Dim dictionaries As AcadDictionaries
    Set dictionaries = ThisDrawing.Database.dictionaries
  
    Dim dictObj As AcadDictionary
    Set dictObj = dictionaries.Item("acad_tablestyle")
  
    ' Create the custom TableStyle object in the dictionary
    Dim keyName As String
    Dim className As String
    Dim customObj As IAcadTableStyle
    keyName = "NewStyle"
    className = "AcDbTableStyle"
    Set customObj = dictObj.AddObject(keyName, className)
      
    customObj.Name = "NewStyle"
    customObj.Description = "New Style for My Tables"
  
    customObj.CreateCellStyle "NewTestStyle2"
    customObj.EnableMergeAll "NewTestStyle2", False
      
    If customObj.GetIsMergeAllEnabled("NewTestStyle2") = False Then
        MsgBox "Merge all is not enabled!"
    End If
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_EnableMergeAll()
    ;; This example creates a TableStyle object and sets values for
    ;; the style cell merging.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    (setq dictionaries (vla-get-Dictionaries doc))
    (setq dictObj (vla-Item dictionaries "acad_tablestyle"))
  
    ;; Create the custom TableStyle object in the dictionary
    (setq keyName "NewStyle"
          className "AcDbTableStyle")
    (setq customObj (vla-AddObject dictObj keyName className))
      
    (vla-put-Name customObj "NewStyle")
    (vla-put-Description customObj "New Style for My Tables")
  
    (vla-CreateCellStyle customObj "NewTestStyle2")
    (vla-EnableMergeAll customObj "NewTestStyle2" :vlax-false)
      
    (if (= (vla-GetIsMergeAllEnabled customObj "NewTestStyle2") :vlax-false)
        (alert "Merge all is not enabled!")
    )
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-11 18:50

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部