Jump to content

CUI File not loading onto current workspace


Recommended Posts

Posted (edited)

So I've made a CUI file that contains a large number of menus and menu items and am trying to load them at start up. I've used this:

 

(command "_cuiunload" "[name of customization]")
(command "_cuiload" "C:\\Users\\[username]\\Desktop\\CUI\\[cui file]")

 

And what ends up happening is that it will unload it (because i want to be able to apply updates to the cui file online, download it, put it in the same location, then reload the cui file) then load the same cui file into Autocad. BUT. What ends up happening is I get my menu in every single workspace EXCEPT for the one that I am in. I NEED IT WORKING in the one I'm working in.

 

Sorry if I posted in the wrong location. I'm using some LISP and am open to using VBA to get this working as well.

 

edit: using AutoCAD 2016 if that matters at all.

 

I've also tried appending this to the above code

 (menucmd "Gacad.Express=+[name of customization].[Name of root popup menu]")

 

To no luck either unfortunately.

Edited by Bungkai
Posted
So I've made a CUI file that contains a large number of menus and menu items and am trying to load them at start up. I've used this:

 

(command "_cuiunload" "[name of customization]")
(command "_cuiload" "C:\\Users\\[username]\\Desktop\\CUI\\[cui file]")

 

And what ends up happening is that it will unload it (because i want to be able to apply updates to the cui file online, download it, put it in the same location, then reload the cui file) then load the same cui file into Autocad. BUT. What ends up happening is I get my menu in every single workspace EXCEPT for the one that I am in. I NEED IT WORKING in the one I'm working in.

 

Sorry if I posted in the wrong location. I'm using some LISP and am open to using VBA to get this working as well.

 

edit: using AutoCAD 2016 if that matters at all.

 

I've also tried appending this to the above code

 (menucmd "Gacad.Express=+[name of customization].[Name of root popup menu]")

 

To no luck either unfortunately.

Have you considered using a cui enterprise file? That's how I deploy to all of my users. They all have it setup as enterprise and I have it as a partial.

Posted

I have yet to look into enterprise cuis yet. Could you give me a brief rundown?

Posted
Have you considered using a cui enterprise file? That's how I deploy to all of my users. They all have it setup as enterprise and I have it as a partial.

 

Also, I would need to note that it would be customers that I am making the changes for

Posted

We have a single company CUI that I load the standard way. All of my users load this same CUI, from a network location, that is added from the options (Files>>Customization Files>>Enterprise Customization File).

 

This keeps the CUI in read/write mode for me and in a read only mode for all other users. I can push out updates to the CUI at whim. When I make a change a user can either restart AutoCAD or I have a button that runs the following LISP (ty Lee Mac):

 

(defun c:ReloadEnterpriseCui (/ ext ent main wscurrent)
 (if
   (and
     (setq ext (if (< (atoi (getvar 'acadver)) 18) ".cui" ".cuix"))
     (findfile (setq ent (strcat (getenv "EnterpriseMenuFile") ext)))
     (findfile (setq main (strcat (getenv "MenuFile") ext)))
     (setq wscurrent (getvar 'wscurrent))
     )
    (progn
      (setenv "EntepriseMenuFile" main)
      (command "._menu" "")
      (setenv "EntepriseMenuFile" ent)
      (command "._menu" "")
      (if (/= "" wscurrent) (setvar 'wscurrent wscurrent))
    )
   (prompt "\n** One (or both) CUI files not found ** ")
 )
)

Posted

Would this work in the same way if clients at home were to download it from a server?

Posted

As long as you have your image references setup properly it should.

Posted (edited)
As long as you have your image references setup properly it should.

 

Okay so I'm not sure I quite understand this whole thing. You press a button which runs the above LISP code you've posted and that LISP code will automatically find the cui file in a certain network location and make the change.

 

The enterprise CUI/CUIX file.... is it any different from a main customization file?

 

And the first time loading process. For me, I would be loading it with CUILOAD every single time if I want to make the change.

 

What about the clients? They manually go to options (Files>>Customization Files>>Enterprise Customization File)?

 

 

 

 

 

edit: Just wondering if there is a quick fix for my problem. Because I don't see why it would show up in ALL other workspaces except the one I loaded into AutoCAD with.

 

And also just in case I haven't been clear enough.. say I have 3 workspaces. 'Default', 'Personal', 'Work'. I close AutoCAD in the workspace 'Work'. I then load cui file that runs this code on start up:

 (command "_cuiunload" "[name of customization]")
(command "_cuiload" "C:\\Users\\[username]\\Desktop\\CUI\\[cui file]")   

 

I get nothing in the workspace 'Work'. I switch to 'Personal' workspace, this workspace got the cui change. 'Default' also got it. And if I were to close AutoCAD in 'Personal', then 'Personal' would not get the cui change but the OTHER two workspaces do. Please help, this is driving me insane.

Edited by Bungkai

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...