My Photo
CADit

Enter your email address:

Delivered by FeedBurner

Between the Lines

RobiNZ CAD Blog

Between the Poles

AutoCAD Toolpalettes

July 21, 2007

Palette Sensitivity

The following incite comes from Matt Murphy: Also recently shown on Heidi Hewett's Blog - http://heidihewett.blogs.com/my_weblog/2007/06/good_question_p.html

The timer settings for rollup, rollout and the new "roll out then rollup" (called "holdopen") are stored in the fixed profile XML file.
By default these settings are not specified.
You can add these settings to the fixed profile XML file by editing it to provide non-default values for each of these behaviors.

To make the changes first back up the "FixedProfile.aws" file in your support/Profiles directory and then edit it using any text editor. I use XML Notepad, but any text editor will do the trick.
Note: there is a distinctive fixed profile based on user login name of your Windows operating system.

If you open the file in a plain text editor the file will be hard to read because it is not well formatted, using Microsoft's XML Notepad formats the file nicely making it easier to navigate and modify, but it takes a bit of getting used to. The changes to make are near the top of the file.

Search for the word "<AcApData>" (should be right at the top).

Immediately after this string paste in the following:
<PaletteRolloutInfo PaletteRolloutDelay="100"/>
<PaletteRollupInfo  PaletteRollupDelay="800" PaletteHoldopenDelay="4000"/>
Carriage returns and additional white space in this file is ok.

Note: Each of the values is specified in milliseconds.

In the example shown above the values provided are the same as the defaults...
1/10th second rollout delay
8/10th second rollup delay
4 second holdopen delay

I prefer to increase the values as shown in the XML Notepad view below (click to enlarge)...

xml1

8/10th second rollout delay - this prevents the toolpalette flying out when I inadvertently hover over it, when I actually want to select a toolbar button.
8/10th second rollup delay
4 second holdopen delay - the holdopen setting applies to the properties palette. When the properties palette is set to an "auto-hidden" (or rolled-up) state, and then invoked by double-clicking on a drawing entity, or by clicking on the properties button, or from the command line, the properties palette will remain visible (rolled-out) for the specified duration (4 seconds in this example) before automatically re-hiding.

So to change the holdopen delay to 5 seconds use:
<PaletteRollupInfo  PaletteRollupDelay="800" PaletteHoldopenDelay="5000"/>

You will need to restart AutoCAD for these changes to take effect. These changes are global and affect all palettes.

July 05, 2007

Making use of the Design Center from your ToolPalettes

One of the most under-utilized tools in AutoCAD is the Design Center. This may be due to previous versions poor performance, or perhaps that your users need to navigate a folder structure to try and find a particular drawing file.

Here is a useful routine that makes this a little easier, enabling the ability to define a particular block library location on a Toolpalette (or Toolbar button). One click... and you are at the library location in the Design Center.

Add this to your ACADDOC.LSP or ACAD.LSP...

(defun adc:go (dir)
  (if (zerop (getvar "ADCSTATE"))
    (command "._ADCENTER")
  )
  (command "._ADCNAVIGATE" dir)
  (princ)
)

Then create a Toolpalette command as shown below...

dc1

The routine checks the current "state" of the Design Center (if it is open or closed)
If it is closed... open it, if it is open... do nothing
Then run the command "ADCNAVIGATE" followed by the full path to the destination folder... done.

June 26, 2007

Toolpalette performance - Over the Network

I have received a number of questions recently regarding poor performance of Enterprise Toolpalettes, there are a few things to take into account when deploying Toolpalettes over the network, the main thing to consider is the general performance of the network. If you are running your CAD Workstations on slow network connections, or a network with a lot of traffic, then your AutoCAD performance will suffer in general. But if that's not the case, here's a few things to consider with respect to your Toolpalettes...

  1. Usability of the Toolpalettes themselves, with large numbers of tools/blocks on your Toolpalette, your users may need to spend some time scrolling down the contents to find the required tool/block.
  2. Network performance: with Toolpalettes stored on the network, particularly if the Toolpalette has a large number of tools/blocks, AutoCAD needs to retrieve all the Toolpalette info/images for display.
  3. Network performance again: when selecting a block from the Toolpalette, AutoCAD needs to retrieve the required block from your block library drawing, and this can be slowed further if the block library drawing file is large and/or contains a large number of blocks.

As a guide...

Try to create Toolpalettes where your users don’t need to scroll at all, this is difficult sometimes I know, but try to minimize scrolling where you can.

With block libraries, try to maintain the block library drawings as small and clean as possible (purge out unnecessary information), and where possible (and logical) as these libraries grow, separate them into smaller sub-group drawings.

June 20, 2007

Exporting/Importing Toolpalettes

My previous posts have concentrated on enterprise toolpalettes, where you want to share toolpalettes on your network for many users. More recently I have had questions regarding sharing customized toolpalettes between users. You can do this simply by exporting a toolpalette from one AutoCAD workstation (this will generate a .xtp file), and importing the toolpalette on the target workstation.

Here's how you do it...

In AutoCAD, right-click on the blank area of the toolpalettes and select "Customize Palettes..." from the context menu...

tp10

In the left-hand pane of the Customize dialog, Right-Click on the palette you want to export and select "Export..." from the context menu...

tp11

Save the export file to a suitable location.

Then repeat the above process on the target workstation (where you want to import the toolpalette), selecting "Import..." from the context menu in the Customize dialog, you will then browse to the location of the .xtp file and select "Open" to import.

June 06, 2007

Managing your AutoCAD User Interface - Toolpalette Swapping

Following on from my previous posts, regarding the setting up and management of your Enterprise CUI and Toolpalettes, the following summary is how I go about managing the Toolpalettes, providing users with the ability to load any required Toolpalette set.

As mentioned previously the Toolpalettes provide the user with the facility to group the Toolpalettes, however this does not help us at an enterprise level, as Toolpalette grouping is saved in the users local profile. So What I do is setup the Toolpalettes independently, what I mean by this is, not setup toolpalettes or grouping, integrated with the workspaces, but rather provide users with an additional toolbar which facilitates the swapping of Toolpalette sets.

The Toolpalette Swap Toolbar

Providing users with a simple Toolbar for Toolpalette swapping means that I can setup my AutoCAD User Interface completely, as one environment, I do not have to consider different discipline or department groups. I can locate all my general toolset/customization in the CUI, Toolbars, Menus etc. and locate any group or discipline specific tools on specific Toolpalettes, thus allowing my users access to the whole toolset where they can choose which Toolpalettes they need to load.

In addition, I can choose to group my Toolpalettes, by loading more than one Toolpalette set at a click of one button on the Toolpalette Swap Toolbar.

Example

As before, the easiest way to show how it's all done is to run through the process of creating the Toolbar, so here goes...

Creating your Toolpalette Swap Toolbar

I am going to assume that we already now have an Enterprise CUI (see previous post), and this CUI has been loaded as a partial CUI for editing. We will create our new Toolbar in this CUI.

  1. Start AutoCAD, and open your CUI dialog.
  2. In the CUI dialog, on the "Customize" tab, select your CUI file from the drop down list (mine is called "my_enterprise_cui")...

    cui5 
     
  3. Right-click on the "Toolbars" node and select "New Toolbar"

    cui6   

    A new Toolbar will be created, type in a suitable name for the Toolbar (mine is called "Toolpalette_Swap").
  4. We now need to create the commands for our new Toolbar.
    In the lower left "Commands List" pane, select the "Create a new command" button, see below...

    cui7

    You will now see that a new command has been created called "Command1" in your CUI file...

    cui8

    Rename the command, I am going to setup 3 Toolpalette Swap command buttons, so I will name them accordingly
  5. We then need to define the macro that will be run when the button is clicked...
    What we are going to do here is write a single line script to set the path to the Toolpalette that we want to load.
    Here is the script...

    ^C^CToolPalettesClose;*_toolpalettepath;"S:/!_ToolPalettes/ToolPalette1";ToolPalettes

    Explanation...

    ^C^C - cancels out of any currently running commands
    ToolPalettesClose; - Closes the current Toolpalette (; the semi-colon acts as a carriage return)
    *_toolpalettepath; - Command to define the path to the Toolpalette
    "S:/!_ToolPalettes/ToolPalette1"; - The path to the Toolpalette we want to display
    ToolPalettes  - Command to toggle the Toolpalette back on (Important Note: there is a single space immediately after the last "s ")

    cui9
  6. Now that we have our command defined, we can drag it onto our empty Toolbar.
    You do this by Left-click and hold on the new command in the Command List (lower left pane) and drag and drop onto the empty Toolbar (upper left pane). You can then select a predefined icon for use on the button or define your own. For this exercise I have selected the default Toolpalette icon.

    cui10

    Repeat the above process to create the commands and buttons required.
  7. When you have finished, click the "OK" button in the CUI dialog and your new Toolbar should be visible.

    tb1
  8. But wait a minute... now that we have commands to display our 3 new Toolpalettes, how do we get back to the standard AutoCAD Toolpalette...
    Using the above procedure, create another command button, with the following piece of LISP code as the Macro entry

    ^C^C(command "ToolPalettesClose" "*_toolpalettepath" (strcat (getvar "ROAMABLEROOTPREFIX") "Support/ToolPalette") "ToolPalettes")

    This will return you to the default AutoCAD Toolpalette set.
    The "ROAMABLEROOTPREFIX" variable provides the path to each users local AutoCAD support folder under their respective windows user profile.

So that complete's the postings, detailing how I manage an Enterprise CUI, and Enterprise Toolpalettes.

June 03, 2007

Managing your AutoCAD User Interface - Toolpalettes

Following on from my previous post, here's an overview of how I go about managing AutoCAD's Toolpalettes at an enterprise level, over a network for multiple users.

As mentioned in my previous posting "Managing your AutoCAD Interface", this is how I manage Toolpalettes at an enterprise level, that's not to say that this is how it should be done, just how I do it. If anyone reading this has some other good ideas, please share, I am always interested in alternatives, and everything I do has been learnt over the years from someone else.

The Toolpalettes

The Toolpalettes are (in my opinion) the easiest way to provide customized content to users. They are easy to customize, using a drag-and-drop process for building palette content. I can add, change, remove content from the toolpalettes as I am undertaking other work tasks.

The Toolpalettes also provide the user with the facility to group the Toolpalettes, however this does not help us at an enterprise level, as Toolpalette grouping is saved in the users local profile.

What I have done is manage the Toolpalettes independently, what I mean by this is, not setup toolpalettes or grouping integrated with my workspaces, but rather provide users with an additional toolbar which facilitates the swapping of Toolpalette sets.

I setup these enterprise Toolpalettes on the network, in a read-only location.

Example

The easiest way to show how it's all done is to run through the process of creating the Toolpalettes and Toolbar, so here goes... (and I appreciate that the order in which I am doing this is highly unlikely to be exactly what you need to do, but I am sure you can adapt the procedure to suit)

Create your Toolpalettes

1. Create the folder locations for your Toolpalettes.
    I generally have a "Toolpalettes" sub-folder setup on the network, under my primary network CAD support folder (in this case sitting on my mapped S: drive)
    (I have preceded the folder name with "!_" only to force the folder to the top of the folder order for this example)

    Tp4

2. Start AutoCAD, turn your Toolpalettes off and open your options dialog
    In the options dialog, set the Toolpalette path to you Toolpalette folder location, in this example "S:\CAD\!_ToolPalettes\ToolPalette1" as shown below

    Tp5

3. Turn the Toolpalettes on, you will see a new empty Toolpalette, as shown below

    Tp6

4. You will also see that the Toolpalette support files have been created in the folder location...

    Tp7  Tp8

5. You just repeat the above process for each Toolpalette you want to create.

    So that's the Toolpalettes created, I'll follow-up in my next post to show how to setup a toolbar to swap between the toolpalettes.

May 31, 2007

Using XML Notepad 2007 with AutoCAD ToolPalettes

As you are probably aware, the AutoCAD interface CUI, profiles, toolpalettes etc. are maintained as XML files. The customisation of the interface, our AutoCAD profiles and the Toolpalettes is all done via the AutoCAD interface, we no longer need to edit these files directly at the code level.

Then there are the Toolpalettes... Have you ever put a toolpalette together, ordered the tools on the palette how you want them, then, after restarting AutoCAD (or just swapping to another palette and back) the tool order is lost. You re-order them, re-start AutoCAD and the order is lost again!

Why this happens is a bit of a mystery. You would expect AutoCAD to save the toolpalette tool order changes back to the XML palette file on exit, but it doesn't.

There are a couple of methods you can use to fix this problem...
1. You can create a new empty palette and copy the tools over from your original palette to the new palette in the order you want them to appear. Delete the original palette. Exit AutoCAD. re-start AutoCAD and check.

2. You can edit the Toolpalette XML files directly to correct the order
The XML files...
"AcTpCatalog.atc" - Toolpalette Catalog
"<PaletteName>.atc" - Individual Palette files
are a plain text format, but are difficult to navigate and edit in a plain text editor like Notepad

Tp1

I use Microsoft's XML Notepad 2007, you can download it from Microsoft

Opening a toolpalette file with XML Notepad 2007, you are presented with a much more user friendly interface...

Tp2

It is very easy to see the structure of the file, and the order of the tools on your palettes. You can expand each "Tool" node to identify the tools and you can drag the tools into the correct order, or you can use the toolbar to shift the tools up or down...

Tp3

That's generally all I use the XML Editor for, great for fixing tool order on the palettes, I have also used it for globally changing path's to blocks.

Links

  • CADit - General CAD Blog
    MAPit - Map/GIS Blog
    ManageIT - CAD & IT Management

    Positioning Systems, Measuring Instruments, Design Software Solutions

    Autodesk Civil and Geospatial Solutions

    AutoCAD Civil 3D
    AutoCAD Map 3D
    AutoCAD Raster Design
    Autodesk MapGuide
    AutoCAD

Visitor Map

Blog powered by TypePad

Search

  • Google

    WWW
    cadit.typepad.com

My Online Status

August 2008

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31