Cadalyst

MCAD Tech News (#327)

10 May, 2012 By: Cadalyst Staff


The World of AutoCAD Programming Platforms, Part 2

VBA, Visual Studio.NET, and AutoLISP each offer unique benefits and drawbacks for customizing AutoCAD.

By Andrew G. Roe

In the previous installment of this series about AutoCAD programming, we briefly reviewed several environments currently available to programmers. Now, let's take a closer look by developing an example in three of those environments: Visual Basic for Applications (VBA), Visual Studio.NET, and AutoLISP. The first two approaches access the AutoCAD Object Model to obtain drawing information, while the third approach uses AutoLISP functions to obtain this information.

VBA

Even though Autodesk removed VBA from the standard AutoCAD interface, you can still develop and run VBA programs in AutoCAD 2010–2013 using a free, downloadable VBA enabler, the Microsoft Visual Basic for Applications module. Versions are available for both 32-bit and 64-bit AutoCAD, but be aware that VBA is a 32-bit application and can run erratically on 64-bit systems.

menu

To become familiar with VBA routines and compare this approach to other options, let's develop a simple program to obtain some information about the active drawing using a graphical user interface (GUI) for user interaction. After you've downloaded the VBA enabler, start AutoCAD, then perform the following steps:

     1.  Select the Manage tab of the AutoCAD ribbon, and click Visual Basic Editor.
Read more »

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cadalyst contributing editor Andrew G. Roe is a registered civil engineer and president of AGR Associates.

Use Femap's Meshing Toolbox to
Extend and Inspect Meshes

Learn how to merge surfaces that don't meet up, and locate problematic geometry entities.

By Alastair Robertson

Sometimes when working in Femap, you might be faced with a situation where your model contains surfaces that don't quite meet or match up. How do you go about generating a contiguous mesh quickly, without having to mess around with the geometry too much? Femap's Meshing Toolbox can play a role here.

For example, in the model below you can see that the two meshed surfaces don't quite meet up, but we can use the Meshing Toolbox to extend one of them and ensure that a final contiguous mesh is created.

meshing

Read more »
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Alastair Robertson is the product marketing manager for Siemens PLM Software Velocity Series CAE solutions, including Femap with NX Nastran and Solid Edge Simulation.

   

Mark Your Calendar: MCAD Events

 

Let's Go Design: Consumer Products
May 14, 2012
2 p.m. ET
This free webinar from Fisher/Unitech will address importing a 2D drawing or sketch rendering, creating surface sweeps, inserting surfaces as reference geometry, and C2 boundary meshing. Read more »

Introduction to Vuuch
May 30, 2012
3 p.m. ET
This webinar will explain how product development teams can use Vuuch to help optimize communication and get products to market more quickly. Read more »

Autodesk University 2012
November 27–29, 2012
Las Vegas, Nevada
Autodesk University (AU), a conference and exhibition for Autodesk product users, will bring together design and technology professionals for networking, exhibits, innovation forums, and a new curriculum of more than 800 lectures, roundtable sessions, and hands-on labs. Read more »

For a complete list of CAD meetings, conferences, training sessions, and more, check out our calendar of events on Cadalyst.com. Are you hosting an event that you would like to include in our calendar? Submit details at least two weeks in advance to news@cadalyst.com.

       

What’s New at Cadalyst.com

 

Cadalyst Poll: How Much Do You Spend on Your CAD Workstation?
Do you ever wonder how much money your peers spend on their CAD systems? Simply scroll to the bottom of the Cadalyst home page and vote in the latest Cadalyst poll to find out! You can even bookmark the results page and come back later, to see how the results change as more voters weigh in.

CADspeed Blog Post:
Use of Point Clouds for Revit Modeling

Here at CADspeed, we've touted the need for CAD hardware that will get the job done. We are equally intrigued by the growing use of building information modeling (BIM) in our industry, which requires even more hardware capacity and usage power than standard CAD programs. Read more »

NCS: Common Language for CAD Users
Version 5 of the U.S. National CAD Standard is available in an online, searchable format to further streamline collaboration at every stage of a building project. Read more »

Circles and Lines Tutorial: Don't Be Shy — Try Out AutoCAD's New UI!
AutoCAD introduces plenty of reasons to move beyond that old, familiar user interface. Read more »

All-in-One CAD Tip #3:
Rename Xref Layers in AutoCAD, Customize Inventor Ribbon, Update Your Resume

Discover how to improve AutoCAD file management by renaming xref files; customize your Autodesk Inventor ribbon menu; and keep your resume updated, just in case. Sponsored by the HP Z1 All-in-One Workstation, the world's first all-in-one 27" workstation. Read more »


About the Author: Cadalyst Staff

Cadalyst Staff

Add comment

Note: Comments are moderated and will appear live after approval by the site moderator.

AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter



Poll
Which file format do you use most often for CAD drawing/model exchange?
Native format
PDF
3D PDF
DWF
STEP or IGES
JT
IFC
Other
Submit Vote