Please bear with me I'm pretty new to Tool Paletts, and I'm just wondering if I'm missing something here.
I've got a bunch of users who use a company custom palette that is located in a network location so all users can access it which is fine.
Am I correct in thinking that if the CAD Manager makes an amendment to that Palette the process for populating the change is for the CAD Manager to Export it on his machine, and then Import it on each individual users machine?
Is there not a way of the users getting the change automatically as you would if a custom CUI file were amended?
I've gone through other posts but I've not really found a decent solution.
How do CAD Managers handle this?
Thanks for any help.
This is almost entirely dependant on whether tool palette groups are being used. If not, then you can just modify the tool palette in a folder with read/write access and then upload the ATC and associated image folder to the common network location. Palette groups do not work well with common read-only network folders, in this case it would be better to have all palette files in local folders along with a copy-local procedure to keep the common ones synchronized across all computers.
I had the same issue several AutoCAD releases back - the difference is/was that I (we) also have subscription for AutoCAD MEP -- I am providing links to AutoCAD and Vertical information on network based tool palettes:
You will find that there is ALOT of information that is available to you on the Autodesk University website -- if you don't already have a login to the Autodesk University website -- I would recommend it!!
Hope you get your Palettes in "order"!
William, thanks very much for taking the time to share your findings - I've got to do this pretty soon so I'll check out and let you know how I get on.
You can create the custom groups and then locate the AWS file for your profile and make it available for all of your users.
Here are the steps I used (our CAD enviroment is highly customized):
1. Create tool palettes and groups on your machine
2. Grab copy of your local AWS file associated with your profile
3. Copy AWS file to network location
4. Add tool pallete path to company/user profiles (path for tools must be included for routine to work)
5. Create empty temporary profile and save to network (name it Temp to have included routine to work)
6. Run custom lisp that will switch the users profile to a temporary profile and then replace their profile AWS file out with the networked version
I've included a very generic version our the routine we use in house. This will perform #6 and as long as you have taken care of the previous five your tool palettes and groups will come through to your users.
(vl-load-com) (setq fso (vlax-create-object "Scripting.FilesystemObject")) ;create ability to access windows file folders (setvar "ACADLspAsDoc" 0) (setq acadprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object)))) (setq actprofile (strcase (vla-get-activeprofile acadprofile))) ;Create empty temporary profile and save on network - call it Temp (vlax-invoke-method acadprofile 'ImportProfile "Temp" "R:\\Autodesk\\AutoCAD\\Profiles\\Temp.arg" :vlax-true) ;create temp profile to be imported or designate existing profile (vla-put-ActiveProfile acadProfile "Temp") ;switch to temp profile (setq iawspath (strcat "X:\\Autodesk\\AutoCAD\\Profiles\\Profile.aws"))) ;<- modify for path and name of network AWS file (setq copy_path (strcat (getvar "ROAMABLEROOTPREFIX") "Support\\Profiles\\" actprofile "\\Profile.aws")) (vlax-invoke-method fso 'CopyFile iawspath copy_path :vlax-true) (vlax-invoke-method fso 'CopyFile copy_path (strcat Acad_Local_Root "\\User Profiles\\" actprofile "_Profile.aws") :vlax-true) (vla-put-activeprofile acadprofile actprofile) ;set profile as active (vla-deleteprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) "Temp") ;release vla/x function calls and set variables to 'nil' (vlax-release-object fso) (setq fso nil) (vlax-release-object acadprofile) (setq acadprofile nil) (setvar "cmdecho" 0) (setvar "nomutt" 0) (gc) ;garbage collection
The AWS file maintains the grouping categories for your tool palettes. This file is saved under the roamablerootprefix -> \support\profiles -> cprofile (current profile name).
As was mentioned earlier, if the tool palette is already pulled into the user's profile from a network space you simply need to edit it and the changes will show up the next time they reopen - in some cases they can reload depending on how they are pulled in.
I actually edit the palettes directly off of the network location ... if I add an item I clip all items located below the top item and repaste it back into place. Just make sure you backup your palette folder before doing this just in case you accidentally mess up the pasting. I started editting them off of the network because we have many tools that call information using lisp methods and editting them was much easier.
I clip the tools because the palette layout might look correct on your machine but the published version will add the tools in order based on when they are added. Clipping the tools will maintain the order you set ...
Thanks very much for the code and detailed response.
I've done a lot of research into the comments made on the previous posts and have found a simple solution that could work but I have to test in the network environment. I'm guessing you've hit the similar problems as I have hence the code.
I'll give this a go and let you know how I get on.
I started out using the publishing option inside of the Content Browser (MEP) but found that it wouldn't always bring over the correct information causing the tools to not work correctly. I also had our users add the tool catalog from the network so the palettes could be imported - the biggest issue I had was that the palette groups would disappear and when the user pulled the palette group back in to there workspace it would clutter up the list of available palettes.
So what I decided to do was to build the palettes locally using files that reside on the local machines and some located at a netwrok location. Once that was done I generated the palettes by importing them into the content browser, where I would then just copy the palettes out to a network location - skipping the catalog infromation.
Then I created a network CUI and added those palette locations to draw out the palette groups. So I need a 2D and 3D workspace for HVAC, Electrical, and Plumbing that use different palette groups. So I created the groups and assigned the group names to be used. Once the workspaces were set in the network cui file I created the network default profile by setting the network cui as the enterprise and used the standard custom.cui as the main cui file - which led to the original post.
I just found the updating process using the Content Browser to be the least effective. If they added the ability to modify the working parts behind the tools it would make the Content Browser most usable.
The only other aspect that needs to be accounted for is limiting the write access of the palettes to just your machine ... or minimize the ability. If you needed to update the palette and one of your users had write access the last person to close out of AutoCAD overwrites the data contained in the palette groups. I found this out the hard way because we have two offices I would update the main office and copy the update to the secondary location. It would eventually mess up and the changes wouldn't appear. I found that our authorized power user was overwriting when they closed out of AutoCAD to view the changes I just made ...
Good luck and I hope you find a solution that works best for you.
I have been using your code on our environment for some time with great results...
Thanks very much..
But I am still a begginer on Lisp and I noticed recently that an error when loading up acaddoc was showing all the time.
I finally trace it back to where it was coming from and it is from this line.
(vlax-invoke-method fso 'CopyFile copy_path (strcat Acad_Local_Root "\\User Profiles\\" actprofile "Profile.aws") :vlax-true)
; error: bad argument type: stringp nil
Can you help solve this one?
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.