乐筑天下

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

2/6设置样板图形文件位置路径

[复制链接]

58

主题

274

帖子

14

银币

中流砥柱

Rank: 25

铜币
507
发表于 2012-5-5 19:05:00 | 显示全部楼层 |阅读模式
2/6设置样板图形文件位置路径
Private Sub CommandButton18_Click()
'设置样板图形文件位置路径()
      ' 这个范例返回
      ' TemplateDWGPath的目前的设定值,接着改变它的值
      ' 最后重设为原来的值
      Dim preferences As AcadPreferences
      Dim currTemplateDWGPath As String
      Dim newTemplateDWGPath As String
      Set preferences = ThisDrawing.Application.preferences
      ' 取出目前的 TemplateDWGPath值
      'currTemplateDWGPath = preferences.Files.TemplateDwgPath
      'MsgBox " TemplateDWGPath 的目前值是 " & currTemplateDWGPath, vbInformation, "TemplateDWGPath 范例"
      ' 改变 TemplateDWGPath的值
      newTemplateDWGPath = "TestTemplateDWGPath"
      preferences.Files.TemplateDwgPath = "D:\00邓细木CAD汇总\CAD每天使用的图形样板文件(尾缀dwt)Template文件夹"
     ' MsgBox " TemplateDWGPath 的值 " & newTemplateDWGPath, vbInformation, "TemplateDWGPath 范例"
      ' 将 TemplateDWGPath 重设为原来值
      'preferences.Files.TemplateDwgPath = currTemplateDWGPath
      'MsgBox " TemplateDWGPath 值重设成为" & currTemplateDWGPath, vbInformation, "TemplateDWGPath 范例"
  
End Sub
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-6-30 08:51 , Processed in 1.356284 second(s), 54 queries .

© 2020-2025 乐筑天下

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