cad2006中如何一次打开多个工具栏? 做了一个调用cad2006工具栏的小程序,希望各位高手共同完善! 对cad 标准,ucs ⅱ,修改 ⅱ,三个工具栏,由于名称内含空格,而在命令行中输入空格即回车,故没有把它们加进去。还有暂时还不能够像04版那样动态变化。 窗体代码如下: \'打开或关闭某个工具栏 sub toolbarsh(item, keyword) thisdrawing.sendcommand "-toolbar" & vbcr & item & vbcr & keyword & vbcr end sub \'显示全部工具栏 private sub commandbutton1_click() userform1.hide thisdrawing.sendcommand "-toolbar" & vbcr & "all" & vbcr & "s" & vbcr userform1.show end sub \'隐藏全部工具栏 private sub commandbutton2_click() userform1.hide thisdrawing.sendcommand "-toolbar" & vbcr & "all" & vbcr & "h" & vbcr userform1.show end sub \'打开或关闭某些工具栏 private sub commandbutton3_click() userform1.hide if optionbutton1 then keyword1 = "s" keyword2 = "h" elseif optionbutton2 then keyword1 = "h" keyword2 = "s" end if dim objectcontrol as control for each objectcontrol in controls if typeof objectcontrol is checkbox then item = objectcontrol.caption if objectcontrol.value = true then call toolbarsh(item, keyword1) else call toolbarsh(item, keyword2) end if end if next userform1.show end sub \'退出 private sub commandbutton4_click() end end sub thisdrawing中的代码如下: sub call_toolbar() userform1.show end sub sub load() end sub 将上传的dvb文件放入安装目录的support文件夹,在安装目录acad.lsp中加入以下代码,在命令行中输入“tool”快捷命令即可完成调用。 (defun c:tool() (command "vbarun" "call_toolbar") ) (command "_vbarun" "工具栏.dvb!load") (command "acadlspasdoc" "1") ———————————————————————————————————————————————————— 其他的办法: 假如常用到以下的工具栏:标注,标准,绘图,图层,文字,修改,样式,对象捕捉,对象特性。 新建命令,指定下面调用工具栏的宏,可以调用所需的工具栏。 ^c^c-toolbar 标注 s 标准 s 绘图 s 图层 s 文字 s 修改 s 样式 s 对象捕捉 s 对象特性 s 或者 ^c^c-toolbar;标注;s;;标准;s;;绘图;s;;图层;s;;文字;s;;修改;s;;样式;s;;对象捕捉;s;;对象特性;s; 在命令行中输入以下命令,也可完成调用: -toolbar 标注 s 标准 s 绘图 s 图层 s 文字 s 修改 s 样式 s 对象捕捉 s 对象特性 s 输入以下命令显示全部工具栏: -toolbar all s 输入以下命令隐藏全部工具栏: -toolbar all h查看更多