乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 66|回复: 3

创建标注问题

[复制链接]

19

主题

45

帖子

1

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
121
发表于 2009-12-29 11:32:00 | 显示全部楼层 |阅读模式
程序如下,要求同时创建2个标注,但是只有dim_beam(后一个标注)符合要求
sub adddim()
    Set dim_border = ThisDrawing.DimStyles.Add("dim_border")
    ThisDrawing.ActiveDimStyle = dim_border
    With ThisDrawing
     .SetVariable "dimscale", 3  '设置全局比例因子
     .SetVariable "dimlfac", 1     '线性比例因子
     .SetVariable "dimadec", 2     '控制角度标注的显示精确位数
     .SetVariable "DimAUnit", 1     '设置角度标注的单位格式
     .SetVariable "DimDec", 0      '设置标注主单位显示的小数位位数
     .SetVariable "DimDLE", 0      '当使用小斜线代替箭头进行标注时,设置尺寸线超出尺寸界线的距离
     .SetVariable "DimExe", 200      '指定尺寸界线超出尺寸线的距离
     .SetVariable "DimExO", 0       '指定尺寸界线偏移原点的距离
     .SetVariable "DimLUnit", 2    '为所有标注类型(除角度标注外)设置单位制
     .SetVariable "DimTxt", 300         '指定标注文字的高度,除非当前文字样式具有固定的高度
     .SetVariable "Dimblk", "_ARCHTICK"   '指定建筑标记
     .SetVariable "Dimasz", 100             '指定箭头大小
     .SetVariable "DimJust", 0
     .SetVariable "DimTVP", 1          '控制尺寸线上方或下方标注文字的垂直位置
    End With
   
    Set dim_beam = ThisDrawing.DimStyles.Add("dim_beam")
    ThisDrawing.ActiveDimStyle = dim_beam
    With ThisDrawing
     .SetVariable "dimscale", 3  '设置全局比例因子
     .SetVariable "dimlfac", 1     '线性比例因子
     .SetVariable "dimadec", 2     '控制角度标注的显示精确位数
     .SetVariable "DimAUnit", 1     '设置角度标注的单位格式
     .SetVariable "DimDec", 0      '设置标注主单位显示的小数位位数
     .SetVariable "DimDLE", 0      '当使用小斜线代替箭头进行标注时,设置尺寸线超出尺寸界线的距离
     .SetVariable "DimExe", 200      '指定尺寸界线超出尺寸线的距离
     .SetVariable "DimExO", 600       '指定尺寸界线偏移原点的距离
     .SetVariable "DimLUnit", 2    '为所有标注类型(除角度标注外)设置单位制
     .SetVariable "DimTxt", 300         '指定标注文字的高度,除非当前文字样式具有固定的高度
     .SetVariable "Dimblk", "_ARCHTICK"   '指定建筑标记
     .SetVariable "Dimasz", 100             '指定箭头大小
     .SetVariable "DimJust", 0
     .SetVariable "DimTVP", 1          '控制尺寸线上方或下方标注文字的垂直位置
    End With
end sub
回复

使用道具 举报

1

主题

113

帖子

6

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
117
发表于 2009-12-29 17:52:00 | 显示全部楼层
  1. sub adddim()
  2.     Set dim_border = ThisDrawing.DimStyles.Add("dim_border")
  3.     ThisDrawing.ActiveDimStyle = dim_border
  4.     With ThisDrawing
  5.      .SetVariable "dimscale", 3  '设置全局比例因子
  6.      .SetVariable "dimlfac", 1     '线性比例因子
  7.      .SetVariable "dimadec", 2     '控制角度标注的显示精确位数
  8.      .SetVariable "DimAUnit", 1     '设置角度标注的单位格式
  9.      .SetVariable "DimDec", 0      '设置标注主单位显示的小数位位数
  10.      .SetVariable "DimDLE", 0      '当使用小斜线代替箭头进行标注时,设置尺寸线超出尺寸界线的距离
  11.      .SetVariable "DimExe", 200      '指定尺寸界线超出尺寸线的距离
  12.      .SetVariable "DimExO", 0       '指定尺寸界线偏移原点的距离
  13.      .SetVariable "DimLUnit", 2    '为所有标注类型(除角度标注外)设置单位制
  14.      .SetVariable "DimTxt", 300         '指定标注文字的高度,除非当前文字样式具有固定的高度
  15.      .SetVariable "Dimblk", "_ARCHTICK"   '指定建筑标记
  16.      .SetVariable "Dimasz", 100             '指定箭头大小
  17.      .SetVariable "DimJust", 0
  18.      .SetVariable "DimTVP", 1          '控制尺寸线上方或下方标注文字的垂直位置
  19.     End With
  20.     dim_border.CopyFrom ThisDrawing
  21.    
  22.     Set dim_beam = ThisDrawing.DimStyles.Add("dim_beam")
  23.     ThisDrawing.ActiveDimStyle = dim_beam
  24.     With ThisDrawing
  25.      .SetVariable "dimscale", 3  '设置全局比例因子
  26.      .SetVariable "dimlfac", 1     '线性比例因子
  27.      .SetVariable "dimadec", 2     '控制角度标注的显示精确位数
  28.      .SetVariable "DimAUnit", 1     '设置角度标注的单位格式
  29.      .SetVariable "DimDec", 0      '设置标注主单位显示的小数位位数
  30.      .SetVariable "DimDLE", 0      '当使用小斜线代替箭头进行标注时,设置尺寸线超出尺寸界线的距离
  31.      .SetVariable "DimExe", 200      '指定尺寸界线超出尺寸线的距离
  32.      .SetVariable "DimExO", 600       '指定尺寸界线偏移原点的距离
  33.      .SetVariable "DimLUnit", 2    '为所有标注类型(除角度标注外)设置单位制
  34.      .SetVariable "DimTxt", 300         '指定标注文字的高度,除非当前文字样式具有固定的高度
  35.      .SetVariable "Dimblk", "_ARCHTICK"   '指定建筑标记
  36.      .SetVariable "Dimasz", 100             '指定箭头大小
  37.      .SetVariable "DimJust", 0
  38.      .SetVariable "DimTVP", 1          '控制尺寸线上方或下方标注文字的垂直位置
  39.     End With
  40.     dim_beam.CopyFrom ThisDrawing
  41. end sub

回复

使用道具 举报

19

主题

45

帖子

1

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
121
发表于 2010-1-18 18:17:00 | 显示全部楼层
谢谢楼上的,问题解决,不知为何要加后面一句话?
回复

使用道具 举报

0

主题

4

帖子

2

银币

初来乍到

Rank: 1

铜币
4
发表于 2012-11-18 01:14:00 | 显示全部楼层

请问如果是C#中怎么操作,我找不到
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-6-29 23:02 , Processed in 2.015588 second(s), 61 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表