Jump to content

Recommended Posts

Posted

I have made a menu in a CUI that I need everyone in the office to have access to. I placed the CUI file and all the commands and icon images it calls out and needs on the network hard drive that everyone has access to. I then placed this folder in the Support File Search Path on all the computers in the network, and loaded the CUI through the Customize User Interface. I had it work perfectly fine when it was tested on my computer and two other computers on the network. I had our network admin apply read-only permissions to it so that I was the only computer on the network that could change the file and sub folders within the file. Now nobody, including myself can use it. The CUI loads fine but reads, (Read Only), and the menu does not show up. Can I not give this file read only permissions, or is there something else going on here?

Posted

I have a few menus I like to have loaded for us. The .cui is read-only and available on the network.

I call it in our acaddoc.lsp with this:

(defun CESMenu (/)
 (and
   (not (menugroup "CES-Custom"))
   (findfile "S:\\CADD Standards\\CES Custom CUI\\CES-Custom.cui")
   (command "_.menuload" "S:\\CADD Standards\\CES Custom CUI\\CES-Custom.cui")
 ) ;_ and
 (and
   (menugroup "CES-Custom")
   (menucmd "p30=+CES-Custom.POP1")
 ) ;_ and
) ;_ defun

Posted

Couple questions for ya:

1) do you have to have two slashes when calling out the path? " \\ "

2) what do I change the menugroup and menucmd to? My file is PGE_CUI.cui, so would I make the menugroup "PGE_CUI"? But what do I put for the menucmd because I don't have any files labled PGE_CUI.POP1 in the folder anywhere?

Posted
Couple questions for ya:

1) do you have to have two slashes when calling out the path? " \\ "

2) what do I change the menugroup and menucmd to? My file is PGE_CUI.cui, so would I make the menugroup "PGE_CUI"? But what do I put for the menucmd because I don't have any files labled PGE_CUI.POP1 in the folder anywhere?

1) Either double \\ or single /.

2) Change it to whatever your menugroup is called. When you have it loaded on your computer, in the CUI editor, whatever name shows up.

3) Same as above, make it your menugroup name. It's not a separate file, POP1 are the menu pulldowns (they won't autoload).

Posted
1) Either double \\ or single /.

2) Change it to whatever your menugroup is called. When you have it loaded on your computer, in the CUI editor, whatever name shows up.

3) Same as above, make it your menugroup name. It's not a separate file, POP1 are the menu pulldowns (they won't autoload).

 

 

This is whats in my ACADDOC.lsp file:

 

(defun CESMenu (/)
 (and
   (not (menugroup "CES-Custom"))
   (findfile "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")
   (command "_.menuload" "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")
 ) ;_ and
 (and
   (menugroup "PGE_CUI")
   (menucmd "p30=+PGE_CUI.POP1")
 ) ;_ and
) ;_ defun
(command "snap" "1/32")
(command "-plotstamp" "on" "")

 

I get this on the command line:

 

Customization file loaded successfully. Customization Group: ACAD
Customization file loaded successfully. Customization Group: EXPRESS
Customization file loaded successfully. Customization Group: RELAY
Regenerating model.

AutoCAD Express Tools Copyright © 2002-2004 Autodesk, Inc.

AutoCAD Bonus Layer Tools Loaded.
AutoCAD menu utilities loaded.snap
Specify snap spacing or [ON/OFF/Aspect/Style/Type] <0.5000>: 1/32 -plotstamp 
Enter an option [On/OFF/Fields/User Fields/Log file/LOCation/Text 
Properties/UNits] : on Enter an option [On/OFF/Fields/User Fields/Log 
file/LOCation/Text Properties/UNits] :
No unreferenced blocks found.

No unreferenced blocks found.

No unreferenced blocks found.

No unreferenced blocks found.

No unreferenced blocks found.

Enter name of customization file to load:
Command: *Cancel*

Command: COMMANDLINE

 

 

The CUI is not loading. I seem to be missing something. Could it be the path being called out wrong? the actual path to the CUI is:

W:\AutoCAD\PGE_CUI\PGE_CUI.cui

Posted

Change to this:

(defun [color=Red]PGEMenu[/color] (/)
 (and
   (not (menugroup "[color=Red]PGE_CUI[/color]"))
   (findfile "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")
   (command "_.menuload" "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")
 ) ;_ and
 (and
   (menugroup "PGE_CUI")
   (menucmd "p30=+PGE_CUI.POP1")
 ) ;_ and
) ;_ defun
[color=Red](PGEMenu)[/color]

 

You have to also call the command (the last line in red).

Posted

Crap... I totally skipped over that when I looked at it. Thanks... That seems to work perfect.

Posted
Crap... I totally skipped over that when I looked at it. Thanks... That seems to work perfect.

Glad you got it to function. If you need any further help, don't hesitate to ask. :)

Posted

Another method, avoiding the command line call:

 

(defun PGEMenu (  )
 (vl-load-com)
 (or (menugroup "PGE_CUI")
     (and (findfile "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")
          (vla-load
            (vla-get-MenuGroups
              (vlax-get-acad-object)) "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")))

 (and (menugroup "PGE_CUI")
      (menucmd "p30=+PGE_CUI.POP1")))

(PGEMenu)

Posted
Another method, avoiding the command line call:

 

(defun PGEMenu (  )
 (vl-load-com)
 (or (menugroup "PGE_CUI")
     (and (findfile "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")
          (vla-load
            (vla-get-MenuGroups
              (vlax-get-acad-object)) "W:\\AutoCAD\\PGE_CUI\\PGE_CUI.cui")))

 (and (menugroup "PGE_CUI")
      (menucmd "p30=+PGE_CUI.POP1")))

(PGEMenu)

 

And, of course, the vla-method. Sadly, I put this together long before I started using VLisp. This is the first time I've looked at that code since I wrote it.

Posted

Dang it Lee..... As soon as I get it working you throw in a little different version... lol

Thanks for the help guys.

Posted
Dang it Lee..... As soon as I get it working you throw in a little different version... lol

Thanks for the help guys.

 

... o:) ...

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...