Are you looking for ways to make your DraftSight workflows faster and more efficient? Customizations can help you automate your work tasks. DraftSight offers several easy customizations to make it faster to access the tools you use most. Watch Make DraftSight More Powerful with Customizations, an on-demand webinar with industry experts Ramon Busboom and Vince Aman, for valuable insights into customizing DraftSight to meet your needs.
The webinar shares several customization techniques, including:
Scripting – Mass Import
If you are leery of programming you can still learn to automate without programming. A script file can quickly insert multiple points in DraftSight. The script file is essentially a text file that you rename the extension and then save it as an SCR. Once imported, you can use Excel as a staging ground to manipulate the data and insert a label and point on a certain layer.
Visual Basic with Microsoft Excel
If you use blocks in your drawings, you know that they come with a lot of information, and sometimes you need to extract or change that information. An Excel VBA can help with that. With just a few lines of code, you can use Excel to import all the block definitions and instances from DraftSight, and then make changes to the attributes in Excel. And with some simple code, you can even have Excel zoom right to the block you’re working on. Imagine how much time that could save you on mass changes or updates.
Constraints are a great way to add intelligence to your lines and circles, so you can make them horizontal, perpendicular, or control their distance with dimensions. If you have constraints for a part, you can create some tribal knowledge in Excel to control the sales parameters. With some Visual Basic code, it’s easy to link the user-defined cells back to DraftSight, to quickly make changes to the part. Excel and DraftSight can work together to create multiple variations on a single part.
The webinar also covers using LISP to clean up text in DraftSight. Have you ever struggled with bringing PDF files into different platforms and noticing that the text doesn’t import correctly? It’s a common problem, and it can be frustrating when you want to make changes or modifications to the text. But don’t worry, there’s a solution!
Using LISP, you can easily import and export data and clean up your text. For example, if you want to bring a PDF into your drawing, you can use LISP to explode the block and convert the text into objects that you can edit. You can also use a function called Merge Text to combine individual words into a sentence, creating a nice editable text object.
This is especially useful if you have tons of documentation that you need to modify in a method that requires you to update all your drawings. With LISP, you can create a small routine that can quickly help you manipulate text and make your life easier.
You can even write a LISP code with about 50 lines or less that allows you to grab the text objects, create a layer, and import all the text information with the font and style into an editable text object. It’s amazing how LISP can be used to solve even the smallest editing problems.
Visual Basic with SOLIDWORKS – Connecting Layout Locations from 3D to 2D
Visual Basic is an essential tool for those who work with 3D design and need to communicate with 2D design files. With Visual Basic and SOLIDWORKS, it’s possible to connect layout locations from 3D to 2D by taking blocks with XYZ values and tying them to SOLIDWORKS sub-assemblies. The SOLIDWORKS sub-assemblies have a transform that contains the 3D rotation and location information. By connecting these two objects, it’s possible to move one and move the other, making it easy to collaborate between 2D and 3D design worlds.
Getting started with Visual Basic is easy as everything gets installed, and there is no need to buy a separate API. DraftSight has a ton of great examples and documentation, and there are sample projects that get installed, making it easy to learn how to use it. Those who want to start on the Visual Basic route can do so by turning on their macro toolbar, recording an action, and then saving it out as a VBA that SWB file. They can then open Excel and load that right into an Excel Visual Basic for Applications window and start learning from there.
Watch the full webinar and try out some new customizations with DraftSight. Remember, with a little bit of code and some creativity, you can save time and automate your workflow.
Download DraftSight Premium’s free trial for 30-days and try it out for yourself.