Networked CAD Management Part 2: Tool Palettes

pic18 (1).png

The Network Tool Palette

Imagine a magic bag where you can store countless items to use in your everyday life. Now digitize that bag and publish it to your CAD workforce. For good measure, make it read-only to the users. This is what a networked Tool Palette is.

 

There are different ways of sharing a Tool Palette, by exporting and importing or by storing it on a shared drive on a server. My company stores the CORE files for our AutoCAD environment in a cloud that is available to our users worldwide. I’ve previously written about the acad.lsp and acaddoc.lsp files here: Networked CAD Management - Part 1 - Support folder, acad.lsp, and acaddoc.lsp. In this article, I want to bring the power of a networked Tool Palette to light and explain how to get it up and running. My AUGI article will outline more about the theory, but here I will detail the mechanics.

 

Let us talk briefly about how to create a blank Palette, where to create it, and how the support paths work. First, the Tool Pallet's path will conveniently reset itself to the default location if you make the field blank and click apply. This is handy if you need the OOB (out-of-the-box) tools.

 

Next and most important is where to store it. You will not move the files after creating palettes because things will break. There are images and supporting files that want to be next to the Tool Palette files. You’ll either make a folder on your server or get IT to make it for you and set the permissions to read-only for everyone but yourself or your CAD manager. You can do other special things like having a regional palette for different offices where a CAD assistant manager is responsible. In this case, you will set permissions accordingly. For this article, we will assume one CAD manager or one responsible party for Tool Palette editing. The reason for all this is twofold. You will be protecting the Palettes from unauthorized changes and, more importantly, protecting the Palettes from AutoCAD. The way that the Palettes allow a standalone user to easily add and change them also creates a “last one out wins” scenario. The last user to close AutoCAD will overwrite the Palettes. If you have made changes, you’ll lose them.

 

We will use “S:\Acad\Toolpalette” for our location.

 

DanielLenchWPM_0-1672424463737.png

 

Now we will make a blank Palette in our new location. Just add the path in the Files tab of your Options dialog box, and AutoCAD will fill it with a blank palette and the files and folders that support the palette. Notice the folder that was created called Palettes? You should find a NewPalette_UUID.atc file in it. All palettes and objects within them have a UUID assigned upon creation. You don’t need to worry about that unless you are gutsy and want to edit the code of the atc file. In that case, make sure you are through with cross-checking the UUIDs. All the atc files are just XML, and if you know xml, you will most likely find it easier to edit the palettes in notepad++ or your choice of editor.

DanielLenchWPM_1-1672424463744.png

 

DanielLenchWPM_2-1672424463746.png

 

DanielLenchWPM_3-1672424463748.png

 

The contents of this blank palette are below. Notice the UUID in the file matches the filename:

 

 

 

 

 

<Palette FileRevision="24.1.0"
         Revision="24.1.1"
         option="0">
	<ItemID idValue="{06AC790E-6DA3-40D9-9B85-A098091DFA31}"/>
	<Properties>
		<ItemName>New Palette</ItemName>
		<Images option="0"/>
		<Time createdUniversalDateTime="2022-12-28T21:30:06"
		      modifiedUniversalDateTime="2022-12-28T21:30:06"/>
	</Properties>
	<Tools/>
</Palette>

 

 

 

 

 

 

 

After you have a blank palette, I suggest adding something. Then close AutoCAD for the changes to be written. In fact, when editing a Tool Palette, you should never have more than one CAD instance open at a time. This includes any VDI or remote machine logged in under your user. You will lose the changes you make, as mentioned above.

When adding items to the palette, I like to have a DWG to back them up. Most items will require this as the palette pulls the item from the DWG when a user clicks on the item. Think of it like an on-demand insert or Design Center button. You will store the DWGs that support the Palettes in a location that is also shared across your network. This location does not need to be write-protected if you want to allow multiple users the ability to edit the blocks for ongoing revision of standards in a company.

 

I set up a shared location that is available for all users to write to, and after the changes have been approved, I move the files into the production write-protected location.

 

One more note on write protection, the Palettes, and ATC files are the ones that we are protecting. The DWGs will only need to maintain the block name inside of them for things to work.

 

So, we have a folder and file structure like this now:

  • S:\ACAD\
    • ToolPalette (write protected, along with its contents)
      • Palettes
        • New Palette_06AC790E-6DA3-40D9-9B85-A098091DFA31.atc
      • AcTpCatalog.atc
    • Blocks (DWG storage)

Some people like making a DWG for each block, and some like combining similar items. For instance, say you have a bunch of title blocks, seals, notes, and other things that will go in paper space, you could combine them all into one file as individual blocks, or you could split the blocks up one to each DWG. There is no right way, just so it makes sense to your company.

 

Now that we have a bunch of perfect blocks created, named, and saved on the server, we can add them to the Tool Palette. You can either open the DWG and copy (ctrl+c) the block and then right-click in the Tool Palette you want the item to live and select paste. Or you can open Design Center and browse to the drawing with a bunch of blocks in it, select the blocks you want or the entire blocks section, and right-click > Create Tool Palette. The selected objects will be added to a new Palette, and you will need to change the atc file name after you close AutoCAD. The filename will not change if you rename the Palette. Right-clicking the Blocks section will create a new Tool Palette with the Drawing name as the Palette name.

 

DanielLenchWPM_4-1672424463762.png

 

You can copy (ctrl+c) a circle, line, polyline, and other objects and right-click> paste them into a Palette. This will create a command for that type of object and is a seed for getting other commands and custom macros into the Palette.

DanielLenchWPM_5-1672424463772.png 

 

Add a Circle to your Palette and then right-click on it. Choosing Properties will open a dialog box. All palette objects have properties, but the objects that are commands have something special.

 

A Command String section!

 

DanielLenchWPM_6-1672424463776.png

 

You can use the Command String to load other Lisp routines:

DanielLenchWPM_7-1672424463784.png

 

Or call AutoCAD or Civil3D commands:

DanielLenchWPM_8-1672424463789.png

DanielLenchWPM_9-1672424463792.png

 

Or open a website:

DanielLenchWPM_10-1672424463797.png

 

Or standardize the Layer and Linetypes of objects:

DanielLenchWPM_11-1672424463805.png

 

This code snippet will force block insertion into paperspace, and explode it (because the block is actually two dynamic blocks, each with different visibility states):

 

 

 

(command "_.Tilemode" 0)(command "pspace") ^C^C_.INSERT S:/ACAD/Blocks/01-TitleBlocks/CORE/CORE-SCALE-Standard.dwg \;;;(command "_.Explode" "last")

 

 

 

 

DanielLenchWPM_1-1672459265324.png

 

 

If you have a dynamic block with a visibility state, you can specify the default state:

DanielLenchWPM_13-1672424463818.png

 

If you add a Multi Leader to the Palette, you can add default text in addition to a style, layer, and other parameters:

DanielLenchWPM_14-1672424463824.png

 

Hatches can be added to a palette and have the pattern, scale, angle, and standard AutoCAD parameters available to most other objects:

 

DanielLenchWPM_15-1672424463831.png

 

One of the great benefits of cultivating a palette for users of differing skills is presenting workflows and tools in a simpler and more inviting manner. I do this with a carefully crafted palette for corridor creation. By taking the most used Subassemblies and placing them on a single palette with parameters already defaulted to a region or company standard, a CAD manager will open the world of advanced grading with corridors to more users while creating a consistent and easier way to train.

 

DanielLenchWPM_16-1672424463848.png

 

For greater consistency, I added the file “C3DStockSubassemblies.dll” to my networked support folder, as mentioned in my previous article about CAD management.

 

You will need to use the Content Browser to get the Subassemblies into a Palette.

 

DanielLenchWPM_17-1672424463888.png

 

Something I will say about networked ToolPalette performance is that when you set your path in the options dialog box, go all the way to the ”\palettes\” folder (S:\ACAD\Toolpalette\Tools\Palettes\). If you stop where the program typically sets the path (S:\ACAD\Toolpalette\Tools\) you will see the palettes taking a long time to preload when switching tabs on them.

 

I highly recommend making AND breaking some ToolPalettes and getting someone to help test them out before going into production. The more you mess with and explore Tool Palettes, the more you can do with them.

 

If anyone wants to help code something cool regarding tool palettes, hit me up!

 

I have created custom icons for many of the special things in our palettes. You can find one that is close in the CUI and export the 32x32px image for further editing in GIMP or Photoshop.

 

Jerry Bartels did a 30min workout video about Tool Palettes in 2021, which I highly recommend as a reference. https://www.youtube.com/watch?v=vUfD5TmLzEo

 

I look forward to seeing some more examples in the comments!!!

 

11 Comments