HowToAutoCAD.com http://howtoautocad.com How to use, customise, and ultimately master AutoCAD Mon, 21 Mar 2016 11:13:17 +0000 en-US hourly 1 https://wordpress.org/?v=4.4.10 Free Download of AutoCAD® 2016 http://howtoautocad.com/autocad-2016-free-download/ Mon, 21 Mar 2016 11:13:17 +0000 http://howtoautocad.com/?p=2921

As they do every year, Autodesk are giving away their latest version of AutoCAD® for free. The download link is at the bottom of this page.

It’s free for a limited period of time though – 30 days. Still, this is more than enough time to get some basic work done or evaluate the software for future projects. Be careful modifying existing drawings – I do remember one occasion when I edited some vital drawings with a trial version and saved them, thinking nothing of it… only to find that I’d saved them in a new file format. When the trial duly expired, I was then stuck with no way to open the files!


Click here to download AutoCAD® 2014

]]>
Funny Autodesk errors http://howtoautocad.com/funny-autodesk-errors/ Wed, 18 Mar 2015 13:15:17 +0000 http://howtoautocad.com/?p=2895 A pointless error message saying Software Problem.]]>

Hi everyone,

It has been a while, but I’m still here. I had to laugh the other day when I happened across this error:

A pointless error message saying Software Problem.

Not exactly the most useful message in the world! And, it’s not the first time I’ve had something like this either.

So, in the interest of a bit of friendly humour at the expense of the Autodesk software development team, I thought it might be fun to invite you to mail me your screenshots with things like this. I’ll turn this post into a hall of fame for the most pointless error messages you’ve ever seen from Autodesk….

Will

P.S. If you want to write for my blog, get in touch. I’d welcome your input!

]]>
AutoCAD® Civil 3D® 2015 Survey Fix Utility http://howtoautocad.com/autocad-civil-3d-2015-survey-fix-utility/ http://howtoautocad.com/autocad-civil-3d-2015-survey-fix-utility/#comments Fri, 18 Apr 2014 12:33:28 +0000 http://howtoautocad.com/?p=2890

Hi all,

I have created a new version of my survey fix which should now be compatible with new versions of AutoCAD®. I’ve tested this with AutoCAD® 2015, and it should work with previous versions as well. Download below:

AutoCAD_Project_SurveyFix

Let me know if you have any problems.

Will

]]>
http://howtoautocad.com/autocad-civil-3d-2015-survey-fix-utility/feed/ 7
AutoCAD® Civil 3D® Survey Fix 2013 & 2014 http://howtoautocad.com/autocad-civil-3d-survey-fix-2013-2014/ http://howtoautocad.com/autocad-civil-3d-survey-fix-2013-2014/#comments Wed, 16 Apr 2014 16:00:50 +0000 http://howtoautocad.com/?p=2881 CADBASIC]]>

Hi folks,

A number of you have asked for an updated version of my Survey Fixing utility for Civil 3D®. So due to popular demand, creating an updated version of this tool has become my top priority. I hope to get this out to you very shortly (tomorrow, if possible).

I’d also like to take this opportunity to announce a new project that I have been working on for over a year (woohoo, it’s close enough to being finished that I can mention it!).

It is… … … *drum-roll* …

A new programming language for AutoCAD!

I’ve called it CADBASIC. Its primary design goal from the very beginning has been to create a language that is extremely simple to use.

Because it’s my own proprietary language for AutoCAD®, I have complete control over the syntax of everything, which means if you want a new command or behaviour in the language, I can add it for you, in whatever crazy wacky syntax you like.

Here’s a teaser of the kind of thing I’ve been aiming for:

CADBASIC

A basic example of a syntax that achieves more, with less code. Pretty trivial, but it’s only indicative of the type of thing I’m aiming for, and hopefully you’re all now intrigued :-)

Release date: TBC…

Will

]]>
http://howtoautocad.com/autocad-civil-3d-survey-fix-2013-2014/feed/ 5
Free Download of AutoCAD® 2014 http://howtoautocad.com/autocad-2014-free-download/ http://howtoautocad.com/autocad-2014-free-download/#comments Thu, 29 Aug 2013 06:00:04 +0000 http://howtoautocad.com/?p=2840

Hi all,

Autodesk have extended to us their usual kindness of downloading the latest version of AutoCAD® 2014, for free. The download link is at the bottom of this post.

But, as you’d expect, it’s free for 30 days only. A word of warning – if you decide to try it out, make sure that any files you work on get saved as the version of AutoCAD® that you have already – I made the mistake a few years back of upgrading to a trial version and saving my files as that version, only to later find that I could no longer work on them due to my trial licence expiring! Luckily I was due an upgrade anyway…


Click here to download AutoCAD® 2014

Will

]]>
http://howtoautocad.com/autocad-2014-free-download/feed/ 1
Speed up Trim and Extend http://howtoautocad.com/speed-up-trim-and-extend/ Tue, 13 Aug 2013 06:00:18 +0000 http://howtoautocad.com/?p=2829

Hi Everyone,

I’ve had a quick tip forwarded to me for speeding up using the Trim and Extend commands.

To speed up Trim and Extend, edit the commands in the CUI to include a space and a semi colon and add them to the right click default shortcut menu:

^C^C_extend ;

This is quite a handy little tip, and I’m sure there are other useful commands we could add to the right click menu as well.

Many thanks to Neil Jones for sharing this with us.

Will

]]>
Introduction to managed VB.NET code for AutoCAD http://howtoautocad.com/introduction-to-managed-vb-net-code-for-autocad/ http://howtoautocad.com/introduction-to-managed-vb-net-code-for-autocad/#comments Sun, 28 Apr 2013 06:00:56 +0000 http://howtoautocad.com/?p=982 references]]>

Hello everyone.

Over the years of running HowToAutoCAD.com I have found that hundreds, if not thousands of you are very keen to get into writing your own tools for AutoCAD®. However, you can create tools for AutoCAD® using VB.NET in many ways, and I often see people unsure about the difference between COM automation and using a managed .NET solution.

Without this fundamental understanding you’re going to get confused at some point why something isn’t working. So that’s the point of this post – to explain the differences, and why it’s generally better to use managed code.

What is COM ?

If you’re creating a program, you can quite easily declare a variable and use it in your code. However, if you have two programs that run separately, you don’t have access to one program from the other. If you wanted to access the value of the variable created in one program from the other, you can’t – you’re stuck.

This is why Microsoft invented COM, which stands for Component Object Model. It sets out a standard for how programs can interact with each other. What this essentially means is that we can write code in one program (say Excel for example) to automate another program (say AutoCAD).

For example, we could write this VBA code in Excel:

Set ACAD = GetObject(, “AutoCAD.Application”)
ACAD.ActiveDocument.Utility.Prompt “Hello from Excel!”

This would send an instruction to AutoCAD®, through the COM interface, telling AutoCAD® to prompt the user with the text “Hello from Excel!”.

This is fundamentally a great idea for solving the problem of communicating between processes, and it has been a very useful way to automate programs over the years. However, COM does have its limitations.

What are the limitations of COM ?

In order to get COM working, Autodesk have to create and maintain a COM interface for AutoCAD®, so that other programs can use this COM interface. This also means that Autodesk have to explicitly create a COM interface for each feature, which also means that new functionality will not automatically work with COM. A new COM interface would have to be created.

Having to write an explicit interface for every bit of functionality makes it impractical for Autodesk to support everything. And, unless Autodesk have written a COM interface for what you want to achieve, you’re stuck.

This is essentially the problem with COM, and communicating between two programs (or processes). You’re limited to communicating through mechanisms that are supported by each of the programs.

What does the NETLOAD command actually do ?

You may have used the NETLOAD command before – this command takes a DLL file, and loads it into AutoCAD®. This means that the functionality that the DLL contains has actually been loaded into the AutoCAD® process, which eliminates the requirement to communicate between two programs (or processes).

This means that you no longer need to use a technology like COM, because you have direct access to the internals of AutoCAD® already. This gives us much more power to do what we want, and it is much easier to manipulate AutoCAD® from the inside than from the outside.

This makes using a loaded DLL very much the preferred option.

But what does “managed” code mean ?

Throughout the course of writing an application the size of AutoCAD®, you would need to create many internal classes and subroutines for handling the behaviour of various aspects of the application. Being a DLL inside the AutoCAD® process gives us some access to these internals, which allows us to integrate far more closely with the AutoCAD® application, and potentially achieve much more, in a much more efficient way.

But in order to interact with the internals of AutoCAD®, as programmers we need to know what these internals are. Furthermore, we need to write our code in such a way that it uses the internals of AutoCAD® correctly.

In effect, we have to manage our code, so that we are using the same application programming interfaces (APIs) that are used by the application itself.

So for example, if AutoCAD® has an internal function called “DrawLine()”, then we should also use the function “DrawLine()” in our code as well (assuming of course we want to draw a line ;-)).

How do we know what APIs there are ?

The first thing to do is create a reference in your .NET project to the AutoCAD® Type Libraries. To do this, you’ll want to right click on your project in VB.NET, and select the option to add a reference. This will pop up the form below:

references

 

For access to the managed libraries in AutoCAD®, you’ll want to select “acdbmgd.dll”, “acmgd.dll” and “accoremgd.dll”. This will add the relevant type libraries to your VB.NET project, and you can then use these in your code.

What next ?

Well now you hopefully understand the difference between COM and managed .NET code. The next step is to create your first .NET project using these libraries. You’ll need to create your VB.NET project as a class library, which should cause it to compile to a DLL. Also be careful to select the appropriate VB.NET framework to use when compiling your .NET project to a DLL. Ideally you will want to target the .NET framework that your version of AutoCAD® uses. You can do this by right clicking on your project, and selecting properties, and then in the Compile options. Then build your project from the debug menu, and then use NETLOAD to load your DLL, and if all went to plan you have successfully created a managed VB.NET project for AutoCAD.

That’s my piece for today – I hope this article was helpful.

Will

P.S. Don’t forget to subscribe if you found this article helpful – more tips and tutorials to come :-)

 

]]>
http://howtoautocad.com/introduction-to-managed-vb-net-code-for-autocad/feed/ 6
HowToAutoCAD Competition http://howtoautocad.com/howtoautocad-competition/ Mon, 04 Mar 2013 06:00:40 +0000 http://howtoautocad.com/?p=2774

In the interest of trying to get as many top tips on HowToAutoCAD.com as possible, I’ve decided to hold a competition, and there will be a cash prize for the winner in the amount of £25.

All you have to do is:

  • Think of your best AutoCAD® related tips and/or advice.
  • Write an article explaining your tip. Broadly speaking you’ll want to explain what your tip is, when and where it is useful, and why. But of course this is all part of the fun, and you are free to write the article as you wish.
  • Submit your article to me via email with a title (hopefully a nice catchy one, but that’s up to you of course)
  • Wait and see if you won, and then watch the cash and kudos roll in… 😀

It doesn’t have to be a 5,000 page thesis, but it doesn’t want to be one line either. Your article will not be judged on how long it is – more important than everything else is that it contains a great tip or piece of advice that others will find useful.

To enter, send your article to competition@howtoautocad.com. This will also indicate your acceptance of the competition terms and conditions. Your article will be reviewed, and may be selected for a post on HowToAutoCAD.com. If it gets posted, you’re one of the finalists! Get this far and you’re in with a chance to win the competition.

The final closing date for entries is 19th April. After this, the judging panel will decide on a winner, who will be announced on Friday 26th April.

I look forward to reading all your tips!

Will

 

 

 

 

]]>
The BCOUNT Command http://howtoautocad.com/the-bcount-command/ Thu, 28 Feb 2013 06:00:03 +0000 http://howtoautocad.com/?p=2790

BCOUNT is a very simple and quick command for extracting information from your drawing, namely, a count of the number of blocks in your drawing, categorised by their type.

It’s really simple to use – just enter BCOUNT in the command line and make a selection. The command line will then report to you the total number of blocks selected, followed by a list of the block types, and how many of each type were selected.

This can be a really useful way to get a quick overview of what’s going on in your drawing. If you’ve inserted a load of markers for certain things on a location plan for example, and you know the total number of each type that you should have added, this is a great way to double check your work. But do be careful though, because dynamic blocks can sometimes be missed if you have used any of the dynamic options.

That’s it for today,

Will

]]>
Identifying System Variable Differences http://howtoautocad.com/identifying-system-variable-differences/ Mon, 25 Feb 2013 06:00:19 +0000 http://howtoautocad.com/?p=2773 sysvdlg]]>

I’ve often been in a situation where a certain command or entity seems to behave differently in one drawing compared to another. Things such as how drawing units are handled are controlled on a drawing by drawing basis, by saving system variables in the drawing. With this in mind, it can be very useful to try to reverse engineer the differences between two drawings, so that you can identify what the offending system variables might be. Identifying these variables and tracking down the root cause to our problems is fundamental to attaining a good grasp of AutoCAD®, so that we will know how to tackle similar problems in future.

I’ve invented a neat way of tracking down the differences between two (or more) drawings, and it’s using an express tool called SYSVDLG. You can also access this command from the Express Tools ribbon tab, in the Tools section. Once you’ve started the command you’ll be presented with this:

sysvdlg

This screen allows you to edit the values saved in system variables. This is great functionality, but for the purposes of our comparison between drawings we are after the “Save All” option. This option exports all system variables to a SVF file.

The SVF file is simply a text file that contains the variable name followed by its value. Although it’s not a native format to Excel, we can still open it using Excel and it will be opened with the data populated in the first column of the spreadsheet. You can simply repeat this export process for any other drawings you want to compare against, and just copy and paste the columns into the same spreadsheet like so:

sysvdlg_excel

Now that you have the two (or more) columns side by side, you can enter a simple formula to compare the columns. As shown above, we are just using a simple IF statement in excel to check the values of the cells, and if they’re not equal to each other then display the text “!! DIFFERENT !!”, otherwise display nothing. This is a very quick way of identifying differences that may not be immediately obvious when skimming down.

I hope you find this tip as useful as I have in the past – I’ve lost count of the number of times that I’ve been caught out by an obscure system variable that I didn’t even know existed, which was for some reason changed in a drawing that I’d inherited from someone else !

If you found this tip useful please do consider subscribing below, and if you have a tip you’d like to share, let me know!

Will

 

]]>