Jump to content

Loading partial CUI from acad.lsp causes command line and ribbon not to load


Recommended Posts

Posted (edited)

I am putting together a set of lisps and a .dll to give out to our superintendents who are basically CAD illiterate. I currently have them loaded through acaddoc.lsp and acad.lsp.

 

The only trouble is, I added a partial cui to go along with them and have it loaded with acad.lsp using MENULOAD. Now AutoCAD is failing to load the ribbon and command line. If I take away the acad.lsp, I do not get any errors when AutoCAD starts up, but I do have to recover the command line and ribbon by switching workspaces.

 

I was under the impression that AutoCAD loaded its main cui files before acad.lsp, so why is this a problem? Should my partial just be a copy of the main file with added toolbars/tabs? Any suggestions?

 

Code in acad.lsp is:

(command "cuiload" "C:\\Program Files\\Autodesk\\AutoCAD 2013\\Support\\LISP_Routines\\ImportExport_Toolbar.cuix")

Edited by pitcher8811
Code correction
Posted (edited)

So, to answer myself, and for anyone in the future:

 

It would seem as though AutoCAD has no problem loading the cui the first time. It is in all subsequent attempts that it fails. I think this is because it is already loaded and the customization group name already exists. I would have expected it to just try and then not load if the group was already there, but what actually happens is AutoCAD asks for another file. Since this command is running from acad.lsp, it can't be given one and AutoCAD freaks out a little bit (Feel free to correct me if I'm wrong). I will have to come up with something to check for an existing group and then only load the cui if it is not already present.

 

Edit: This is the code that i got to work, just in case someone else tries to do the same thing.

(IF (= nil (menugroup "ImportExport"))(command "cuiload" "C:\\Program Files\\Autodesk\\AutoCAD 2013\\Support\\LISP_Routines\\ImportExport.cuix"))

In case you're curious as to why this is in a folder called LISP_Routines, it's because it was added as an afterthought, and I didn't want to add yet another support path to put this in it's own folder.

Edited by pitcher8811
Solution
Posted

All my cui stuff is in LISP directory can find it easy. Have you though about using a Profile ? You can have different desktop Icons for different user versions.

Posted

I'm having to load it onto several dozen computers, each with only one user, so there's not really a need for multiple user versions. It's part of a package deal with some lisp files and some .net stuff, and it should just be a once and done kind of thing. I would let the users load it themselves through CUILOAD or MENULOAD, but they're only superintendents who need to get dimensions or export/import CSV files. They're pretty much AutoCAD illiterate and won't be creating anything, just running a handful of commands.

 

My ultimate goal, which I finally got to yesterday afternoon, was to have an executable file copy all of the files and folders into AutoCAD's directory, and have acaddoc.lsp and acad.lsp add the support paths for the folders and load the lisps and dlls. Now all they have to do is run the executable as an admin from our server and everything installs and load itself.

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