CAD Forums > BricsCAD Users

How-To Needed: Establishing a Company CUI and Allow Other Customization

(1/2) > >>

CEHill:
To BricsCAD Power Users and CAD Administrators,

I would appreciate your experiences, tips, and other information on the subject line topic.

 :smitten:

Clint

JasonB:
I'm guessing you're looking to utilise an enterprise cui arrangement? BricsCAD doesn't currently support this option. Some info on the BricsCAD menu setup:

* The root CUI contains the workspace options. As workspaces are user configurable the root CUI must have read/write for the user. BricsCAD will complain otherwise.
* Workspaces in CUI other than the root are ignored. However there are options to import workspaces.
* In recent releases, BricsCAD has introduce an interface feature allowing users to switch between different styles of menu. In effect this feature allows the user to switche to a different root CUI. I would need to check but I think the interface option is embedded, you can't disable it.
* BricsCAD works natively with .CUI. Menus in the form of .MNU & .CUIX are converted to CUI on loading.

If you're looking to utilise a custom workspace, then i don't think there is a bullet proof solution.You could look at having a custom root cui that you would copy into the users space to give them the required read/write access. However, this also means the user can change things, destroying your customisation. You could combat this by re-copying the root cui each time they start BricsCAD, but this would also destroy any legitimate customisation made by the user, which is likely to frustate them.

Instead I would recommend maintaining the company customisation in a partial cui. This can be in a read only state if you want. You can use some LISP tools that ensure that its loaded at startup. Also by default when you load a partial its menus are propigated across all existing workspaces.

CEHill:
PERFECT!!! I thank you very much, 'Prince'! :smitten:

Clint

CEHill:
PrinceLISPalot said,

--- Quote ---You can use some LISP tools that ensure that its loaded at startup.
--- End quote ---

QUESTIONS

1.) Could you share a sample of this partial CUI lisp code?

2.) I am familiar and use autoload statements in the on_start.lsp file. Would this partial CUI load statement be included in each user's on_start.lsp file?

3.) If not in the on_start.lsp file, where would I place the code?

Thanks,

Clint

JasonB:
Yes, on_start.lsp is a good place to check and load partial cui from.

You can make use of a S::Startup function to do those checks. e.g.


--- Code - Auto/Visual Lisp: ---(defun S::STARTUP ( )        (CCL-LOADMENU "CCL-EXTRAS" "CCL-Extras-BCAD.cui") ; Load CCL Menu if not already loaded(prin1))
CCL-LOADMENU is a function that checks if a given menugroup is loaded, and if it isn't loads it.


--- Code - Auto/Visual Lisp: ---; CCL-LOADMENU; Load menu will check to see if the given Menu group is loaded.; If it isn't, then it will be loaded (defun CCL-LOADMENU ( groupnm menufile / oACAD oMenuGrps)        (setq oAcad (vlax-get-Acad-Object)) ; retrieve Acad-Object        (setq oMenuGrps (vla-get-menugroups oAcad)) ; retrieve menugroups        (if (not (menugroup groupnm)) ; if the menugroup isn't loaded                        (if (setq menufile (findfile menufile)) (vla-load oMenuGrps menufile)) ; THEN load menu if it exists                        (vla-item oMenuGrps groupnm) ; ELSE return menu object        ))

Yet to update for V24 but we have a example setups for BricsCAD here that includes this
https://www.cadconcepts.co.nz/resources/bricscad-sample-setup

Fun fact for BricsCAD. the S::Startup function can be called multiple times from any lisp file set to autoload, such as on_start.lsp and on_doc_load.lsp. Can even be added to .mnl files.

Navigation

[0] Message Index

[#] Next page

Go to full version