Load partial CUI file programmatically in BricsCAD startup
Hi,
How many ways to programmatically load a CUI file in BricsCAD. I can register my assemblies in Windows Registry by Demand Loading method. However, how can I register my CUI file with the installation?
Thanks,
Khoa
0
Comments
-
Hi Khoa Ho,I'm not sure how much there all the way, but I know how to load CUI files into Bricscad cui. You just use "Menuload" command in BricsCAD to load CUI file you need. Very simple. Good luck.0
-
Hello Tuan,Thank you for your response. I am looking for auto-loading CUI file in BricsCAD startup. I am developing a BricsCAD plugin and want to make an installation (.msi or .exe) that will automatically register my custom CUI file (via AutoLISP for example) after the installation. Then users open BricsCAD and see the new menu was added.Thanks,Khoa0
-
BricsCAD supports a number of command line switches and arguments. You can run a script or an application at startup, both of which can load a partial menu. If you accept that BricsCAD is launched as part of the installation of your app, you should have no problem.0
-
Hi Roy,I saw your post is useful: http://www.b-k-g.nl/loading-lisp-programs.htmlHowever, I had the code to load the menu inside the assembly, by running LISP command to register BricsCAD menu. I would like to see an easy way to automatically register a new menu on BricsCAD startup.Thank you.0
-
Khoa,
perhaps this forum post will give you some ideas
https://forum.bricsys.com/discussion/28627
You should only need to load your partical.cui once. The root cui (For BricsCAD this is usually the default.cui) retains a list of partials and will load them automatically.
On startup your code should check to see whether your menugroup is present
[code](menugroup mnuName)[/code]
If it isn't, then load.
If your using LISP, then I would put this check into the on_start.lsp, which is loaded automatically on startup.
Regards,Jason Bourhill
0 -
Hi Jason,You link is useful. I also found some good posts in this forum. Thank you very much.Khoa0
-
@ Khoa:
I think my suggestion in post #4 can work for you. You should definitely try it.
You can also have your installer create a new shortcut with custom command line switches and arguments.
If BricsCAD is started from this shortcut your app could start automatically and then, if necessary, load your menu.0 -
Hi Roy,Thank you for your suggestion. Having the custom shortcut for BricsCAD with command line switches and arguments is good to have. However, it will not work if users open BricsCAD from the original shortcut, it will not load the custom menu.I ended with loading the menu after the assembly is loaded. You can download .NETScript plugin at: http://www.netonapp.com/Download/NETScript/v1/NETScript.Setup.zipThis plugin for BricsCAD is migrated from AutoCAD. Some features are still not working as expected. But overall it still looks good.Thanks,Khoa0
This discussion has been closed.