用如下方式定义了一个新的工具栏,当AutoCAD关了重开,这个工具栏就变成空的了,怎么能使这个工具栏在新开的AutoCAD可以继续使用? Dim objToolBars As AcadToolbars Set objToolBars = ThisDrawing.Application.MenuGroups.Item("ACAD").Toolbars Dim objToolBar As AcadToolbar On Error Resume Next Set objToolBar = objToolBars.Add("test1") If Err Then Set objToolBar = objToolBars.Item("test1") MsgBox "'test1' already exists!!" Exit Sub End If
Dim newButton As AcadToolbarItem Dim openMacro As String openMacro = Chr(vbKeyEscape) + Chr(vbKeyEscape) + "(command ""-vbarun"" ""caidan.dvb!wjd"") " Set newButton = objToolBar.AddToolbarButton(objToolBar.Count + 1, "测试1", "测试1", openMacro) newButton.SetBitmaps ".\jccx\00164.ico", ".\jccx\00164.ico" |