• Tool Palette: Open File or Web Page

    Tool Palette: Open File or Web Page

    Do you have CAD standards document or web page you’d like to make easily accessible to your AutoCAD users?  Does it make sense to create a Tool Palette button for this?  If so, read on.

    Create a tool palette as usual or edit an existing palette.  Add a new tool to it, such as a line.  It will look like this initially.

    Edit the properties of that tool and change three things. Reveal your inner artist when creating the icon image. Right-click to change that image.

    Change the command string to do what you’d like the tool to do.  The syntax depends on whether you’d like to open a file or a web page.  The startapp function will use the appropriate Windows app for the selected file type.  In the example below, the PDF will open in Bluebeam Revu because that is my computer’s default PDF application.

    You’ll notice I have no path defined for the PDF.  The findfile function looks for the file in the AutoCAD Support File Search Path (AutoCAD Options).  As long as you have the intended path defined here, the file will be found.  The path to the file can most certainly be hard-coded if you prefer.

    To open a file:

    (startapp (strcat “explorer file://” (findfile “The Actual File Name.pdf”)))  If the findfile option is appropriate)

    (startapp “explorer file://c:/temp/The Actual File Name.pdf”)  If the hard-coded path option is appropriate)

    To open a web page:


    My command string looks like this for the PDF option.

    Here are my two buttons.