March 25, 2022
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:
^C^CBROWSER;https://www.solidcad.ca/services/;
My command string looks like this for the PDF option.
Here are my two buttons.
Enjoy!
- Accruent
- Advanced Manufacturing
- Architecture
- Architecture
- Assembly Line Automation
- AutoCAD
- Autodesk
- Automotive
- BIM
- Blog
- Blog Posts
- Building Design & Engineering Services
- Building Engineering
- Building Product & Fabrication
- CAM, CNC & Machining
- Civil 3D
- Civil Infrastructure
- Civil Infrastructure & GIS Services
- Civil, Survey & GIS
- CNC Machining Services
- Construction
- Construction
- Construction Project Lifecycle
- Consulting Services
- Consumer Products
- CPQ & Aftermarket
- CTC Software
- Data Management
- Digital Transformation
- Energy & Utilities
- Engineering
- General
- Government & Public Sector
- Industrial Machinery
- Industries
- Industry Topics
- Infrastructure
- Inventor
- Manufacturing
- Mining
- News
- PLM
- Product Lifecycle Management
- Revit
- Sales and Aftermarket for Manufacturers
- Simulation & Analysis
- Software & Technology
- Software Development
- Thought Leadership
- Tips & Tricks
- Visualization
- Visualization & Reality Capture Services