RibbonMenuButton
I am trying to make my plugin compatible for both BricsCAD and AutoCAD. The RibbonMenuButton with autocad is from Autodesk.Windows. What do I need to import to get the RibbonMenuButton from BricsCAD.
0
Comments
-
I use the same CUIX files for plugins for AutoCAD and BricsCAD. This works great. AutoCAD loads CUIX via Bundle, and for Brics you have to call CUIX loading from a plugin:
internal static bool LoadMenu(string pluginPath, string pluginName) { Document doc = Application.DocumentManager.MdiActiveDocument; if (doc is null) return false; string file = pluginPath + "\\" + pluginName + "_Br.cui"; // first we try to download a special version for BricsCAD try { if (!File.Exists(file)) file = pluginPath + "\\" + pluginName + ".cuix"; if (!File.Exists(file)) return false; int oldFiledia = Convert.ToInt32(Application.GetSystemVariable("FILEDIA")); Application.SetSystemVariable("FILEDIA", 0); try { file = file.Replace("\\", "\\\\"); doc.SendStringToExecute($"(if (eq (menugroup \"{pluginName}\") nil) (command \"_CUILOAD\" \"{file}\")) " , false, true, false); } finally { Application.SetSystemVariable("FILEDIA", oldFiledia); } } catch (Exception ex) { return false; } return true; }
0 -
Ok. I am looking for a solution in c#
0 -
BricsCAD's .NET API does not implement RibbonMenuButton. You might use a RibbonSplitButton instead.
0