there is a problem with my code,when I load this dll,the toolbar‘s name can be fond in the customization dialog,but never shows in the UI(AutoCAD custom WS)。。。。It crush me up。。
[CommandMethod("AddToolBar")]
public void AddToolBar()
{
CustomizationSection cs = new CustomizationSection(
"C:\\Users\\Administrator\\appdata\\roaming\\autodesk\\autocad 2012 - simplified chinese\\r18.2\\chs\\support\\acad.cuix");
CAD.Document doc = CAD.Application.DocumentManager.MdiActiveDocument;
Toolbar newTb = new Toolbar("MyTool", cs.MenuGroup);
newTb.ToolbarVisible = ToolbarVisible.show;
foreach (Workspace wk in cs.Workspaces)
{
WorkspaceToolbar wkTb = new WorkspaceToolbar(wk, newTb);
wk.WorkspaceToolbars.Add(wkTb);
wkTb.Display = 1;
}
cs.Save();
}
i dont no y.........need help························
i am a chinese,know little english.so it is hard for me to find codes of this aspect at this website,can u get me the link of the code?
thanks。谢谢
Hello,
Your code look ok to me.
Does the toolbar appear after switching workspaces manually in AutoCAD ?
I do not see that this cui-file was loaded into AutoCAD (with command _CUILOAD). Also there is no any toolbar control created in your's code.
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Can't find what you're looking for? Ask the community or share your knowledge.