Back
5 Tips to Improve Your Prompt on MecAgent CAD Copilot
How to write clearer, more structured CAD prompts to generate more reliable, reusable, and powerful automations with MecAgent.

5 Tips to Improve Your Prompt on MecAgent CAD Copilot
Artificial intelligence is transforming the way we interact with CAD software. With MecAgent AI CAD Copilot, it is now possible to create complex automations using simple natural language requests. However, the reliability of your macro depends directly on the precision of your “prompt”!
Writing an effective CAD request is not something you can improvise. As in prompt engineering, the quality of your instruction directly determines the performance, reliability, and reusability of your automations.
Based on advanced techniques from the user manual, here are 5 essential tips to craft high-performance prompts and get the most out of your assistant.
1. Create Interactive Interfaces (Custom Dialogs)
An effective CAD request should not only describe an action—it should also anticipate the necessary user inputs. With this in mind, avoid hardcoding values in your scripts.
The best way to provide data to your automation is to ask MecAgent to generate a custom user interface.
You can request very specific elements to guide the user before script execution:
Numeric input fields (ideal for defining a fillet radius)
Dropdown lists (to choose units, export formats, or constraint types)
File or folder path selectors (to process all files in a specific directory)
Pro tip: Always specify the context of your document. Instead of saying “Export,” say “In my current assembly” or “In the currently open drawing.” MecAgent will automatically detect the correct target document.
2. Break Down Complex Automations into Sub-Steps
Overly complex or dense instructions significantly reduce the chances of generating reliable automation. In CAD, as in prompt engineering, it’s more effective to think step by step.
A common mistake is trying to request a massive automation in a single long sentence. The recommended method is to proceed incrementally: start with the first step, validate that it works, then ask MecAgent to enhance it by adding the next step.
If a new step breaks the code, you can always reload a previously working version using the “Remix” button.
For highly complex processes involving multiple independent tasks, it’s best to build and validate each main task in a separate chat. Once validated, go to My Automations and use the “Merge” function to combine them into a final automation.
Example:
Chat A: Create a macro that increments the custom property REVISION_NUMBER by +1
Chat B: Create a macro that flattens and exports a sheet metal part as DXF
Once both work, go to My Automations, click “Merge,” and ask the AI to combine them into a single final automation.
3. Combine SolidWorks and Windows Operations
A well-crafted request can go far beyond a simple CAD action and describe a complete workflow including system operations and data processing.
Your assistant isn’t just for modifying 3D geometry. MecAgent scripts can combine CAD actions with Windows file operations within the same workflow.
This is a major advantage for quality assurance (QA) or manufacturing exports. Don’t hesitate to ask the AI to:
Rename files according to a specific naming convention
Create structured subfolders (e.g., by configuration or assembly) and move files into them
Clean up and reorganize directories automatically
Browse all files in a folder and extract CAD metadata into an Excel report
4. Modernize and Rewrite Your Old VBA Macros
Do you already have working but outdated scripts? No need to rewrite them manually. You can simply paste any VBA macro into the chat and ask:
“Rebuild this exact same script.”
MecAgent will automatically convert it into its C#-based environment. C# executions are much faster than VBA, more reliable, and you’ll then be able to easily extend the new macro with dialog boxes or file operations.
5. Use Background Listeners and Target Your Output Formats
Make your macros reactive using Background Listeners. You can ask MecAgent to create a script that pauses and “waits for a specific user action.” For example, the macro can wait for you to select an entity (a face or an edge), or wait for a “double Ctrl+click” before automatically applying a rule or constraint.
Finally, be demanding with your output formats! Instead of simple messages, ask MecAgent to:
Create an Excel, CSV, or JSON file containing extracted results (mass, dimensions)
Write results directly into the FeatureManager or custom properties of the part
Generate a log file for debugging
Conclusion
Clear, structured, and result-oriented instructions lead to reliable and reusable automations. Context, steps, conditions, and outputs should always be explicitly defined.
A poor prompt would be:
“Create all drawings”
A high-performance prompt would be:
“Create an automation that iterates through each sheet metal part in my current assembly. For each part, create a drawing, place a flat pattern view on the left, and a non-flattened isometric view in the top right.”
By applying these CAD prompt engineering best practices, you will improve the accuracy, robustness, and reusability of your automations.
Be precise, iterate step by step, and let the AI write the code for you.

MecAgent Inc.
Other articles you might like
Learn how to increase your productivity with calendars


