Tag Archives: DOSLib

DOSLib goes open source

What’s DOSLib?

DOSLib is a free library of LISP functions that adds a lot of functionality to AutoLISP/Visual LISP/BricsCAD LISP. It makes a lot of programming tasks a lot easier, because instead of writing a bunch of code to do tricky stuff, you can just load the library and call a ready-made (dos_xxx) function. There are hundreds of functions that cover the following areas (taken from the McNeel Wiki):

  • Drives – Check for drives, change between drives, and check available disk space.
  • Paths – Manipulate path specifications.
  • Folders – Create, rename, remove, select, and change folders. Return special operating system folders.
  • Files – Copy, delete, move, rename, and select files; get directory listings, search and find multiple instances of files, and change file attributes.
  • Print – Get and set default printers, and spool print files.
  • Configuration – Manipulate Windows-style initialization (INI) files, and access the Windows Registry.
  • Processes – Run operating system commands or other programs.
  • Interface – Get strings, integers, reals, and lists from the user. Display Windows message boxes, progress meters, and splash screens.
  • Strings – Tokenize strings, extract characters, find characters, insert, remove, and replace characters, and trim characters.
  • Math – Trigonometric calculations, vector manipulation, statistical analysis, and more.
  • CAD – Save all and close all open files. Preview drawings and list xrefs.
  • System – Get system information, sort lists, change the system date and time, manipulate the keyboard, and play sounds.

Why would a CAD LISP programmer use it?

There are many DOSLib functions that would be difficult to write purely in LISP and quite a few that would be impossible. So for those people who want to code for AutoCAD and BricsCAD without the bother of learning ARX/BRX and dealing with the associated compiler requirements, DOSLib has been a godsend. It’s worth noting that some of the DOSLib functions have been added to BricsCAD’s LISP engine, so depending on the function you use, you may not even need to load the DOSLib library.

Do impressive-looking stuff without writing much code. You might call it being lazy. I call it being efficient.

A history of dependability

DOSLib has been around for many years. It is currently supported on AutoCAD 2013 and later and BricsCAD Pro V13 and later, but earlier versions have supported AutoCAD releases dating back to 1992! Dale Fugier at Robert McNeel and Associates has been providing outstanding service in developing DOSLib and keeping it up to date. For nothing!

So developers have been able to take advantage of the DOSLib functionality all that time, and Dale has always come up with the goods in terms of updates to work on new releases of AutoCAD and BricsCAD. However, you may have had a nagging doubt about writing code that relies on a third party, or as a CAD Manager relying on such code, no matter how rock-solid reliable that party has proven in the past.

That nagging doubt can now be put to bed, because Dale has announced that DOSLib has been made open source under the very open and simple MIT license. The GitHub DOSLib page has the source, with compilation and other relevant information.

All good news

Dale has also stated that he intends to continue to provide compiled binaries for the foreseeable future, so don’t worry about having to mess with compilers. Even if a meteor happens to land on McNeel headquarters, it’s a pretty safe bet that somebody in the AutoCAD/BricsCAD development community will, after a suitable period of mourning, step forward to compile the code for new AutoCAD/BricsCAD releases when required.

The availability of the source code also opens the door for DWG-based applications (other than BricsCAD) to attempt to provide a higher level of LISP compatibility, to the extent of supporting (dos_xxx) function calls. That means you, the CAD LISP programmer, will have a wider potential audience for any code you write that uses DOSLib functions.

Finally, if you’re an ARX/BRX developer who wants to do something similar to something in a DOSLib function, you now have some handy sample code.

So this is all good news, and yet another example of Dale and McNeel doing the right thing by the CAD community.

AutoCAD 2019 rollout disaster

If you’re an AutoCAD user, you may have been intrigued by the news about the new way Autodesk is bundling up AutoCAD 2019 with various verticals (perpetual license owners need not apply). This is Autodesk’s latest attempt to promote its subscription model and raise prices again. 7% this time, but much more to come. But never mind that, the main point is that you’re getting a whole lot of stuff, and who could say that’s not a good thing?

So it’s most unfortunate for Autodesk that the AutoCAD 2019 rollout has been an unmitigated disaster.

My own experiences in trying to download the product were sub-optimal, but I later learned that I was one of the lucky ones. Subscription users not only had problems with AutoCAD 2019, they found their AutoCAD 2018s were broken too, victims of an Autodesk licensing system meltdown. That’s right, the AutoCAD 2019 launch acted as a remote kill-switch for people’s production software.

Perpetual license users were fine, of course. Only subscription customers suffered. There’s a lesson there that should not go unnoticed.

Back to my own experiences, to begin with I couldn’t download AutoCAD 2019 anywhere, despite it being having been announced everywhere some hours earlier. Autodesk Account wasn’t showing 2019, but it was showing this:

The usual workaround method of downloading the free trial wasn’t any better; that was still on 2018. I even tried installing the execrable Autodesk desktop app (temporarily!), but there was no sign of AutoCAD 2019 there either.

I’ve never had any success using Autodesk’s AVA bot for any real questions, but there was a time when it served as a gateway to Akamai-free downloads, so I tried that. Unfortunately, AVA has been “improved” and that once-excellent feature is gone. I did try asking AVA for the download link to AutoCAD 2019, but that didn’t go well.

First attempt:

Second attempt:

I mentioned my difficulties on Twitter and a few hours later the long-suffering but always-professional @AutodeskHelp people offered this:

Despite appearances, this actually turned out to be helpful because by then the product trial download had been fixed and was offering 2019 rather than 2018. I still didn’t see a direct link and against my better judgement tolerated a very temporary installation of Autodesk’s nasty Akamai download manager. About 5 minutes into the download it said it was going to take about 9 hours so I went away and left it. I returned within the hour to find it was finished, so I have no idea how long it actually took. After immediately uninstalling all traces of Akamai and Autodesk desktop app, I was able to start my evaluation.

So how’s the product? Pretty much the same as 2018, except with a better drawing compare tool. Oh, and the icons are better. The first command I ran in the new release reminded me that some things never change. The ancient rectangular pickbox bug popped in to see me, just like an old friend.

I’ve been warmed by the familiar, comforting experience of this and various other early 90s-era bugs and limitations, where the easiest workaround is to use a competitor’s product to do those bits. More on that in a future post.

An hour or so into using the product saw it crash and burn for the first time:

Don’t take my word for it, though; here are some comments from various users, CAD Managers and long-term Autodesk fans, most of whom had a worse time of it than I did. It’s not just AutoCAD; LT and Navisworks are definitely affected and there may be others. Comments here have been reproduced from various sources under fair use; names have been removed to protect the innocent.

I think it is safe to say that Autodesk are having a very bad day. Account and activation issues, subscription access issues, forum login issues, kudos and comments blocked to some users…

I installed the brand new @Navisworks Manage 2019 last night, and this morning I get the “Your trial has expired” !!!

I can safely say that ‘unimpressed’ is my status right now with the licencing idiocy going on. Not only can I not get the 2019 version, but my 2018 version has stopped working too.

Looks like all subscription (not maintenance or legacy) software is affected this way: logging in and out as well as workarounds posted are not working. Now this is a good reason to abandon Autodesk subscription model.

Good news: Autodesk began rollout of 2019 licenses! Bad news: It might break your 2018 licenses.

Hard to imagine this rollout going any worse.
[Autodesk]”Hold my beer….”

2.5 days without AutoCAD available. I just wish Autodesk would have told us so I could have gone on vacation. Instead, I will have to work thru the weekend to make up lost time.

I love Autodesk and their software, but they have just ditched an entire generation of Autodesk ‘rockstars’ and their subscription portal isn’t working. It really doesn’t look good, does it?

my 2018 is hosed on 3 devices

Unfortunately the situation has lasted for nearly 24 hours and no work done. Can we send the bill to Autodesk?

so I thought I’d try and activate LT
LOL

Although some parts of this are supposedly fixed, it’s not over yet. As I type this, people are still reporting problems and Autodesk is still offering apologies:

Even now, AVA is still completely in the dark about the current release of Autodesk’s traditional flagship product.

It’s great to see users helping each other, though. You may find this Autodesk Forum post by Travis Nave useful as an interim workaround. Also, in a marvellous continuation of McNeel’s free service to the AutoCAD (and BricsCAD) LISP community, DOSLib has been made available for AutoCAD 2019 even before many people were even able to get hold of the software it runs on. That’s what I call service!

All in all, this has not the best start to AutoCAD’s brave new world of oneness. How did it go for you?

Shout out to Robert McNeel & Associates

Let’s start the rebirth of this blog on a positive note. I’d like to express my gratitude to Robert McNeel & Associates for what must surely be the most outstanding example of long-term customer service in the CAD industry.

These days, McNeel is best known for the 3D modelling software Rhino. I have heard good things about this product, but have never used it. However, I am a long-term user of another McNeel product, DOSLib. This is an extensive set of functions that adds greatly to the functionality of AutoLISP. It all works very well and has saved me many hours of work that I would have spent reproducing that functionality. Of course, many LISP programmers could write functions to calculate a cube root, or read a text file, or display a date in whatever format you like, or copy files, or generate a GUID, or toggle the Caps Lock status, or display an HTML file, or return a list of OLE objects in the drawing, or display a multi-select file dialog, or return a list of Windows printers, or a hundred other handy things. The point is, they don’t have to because all that has been done for them and handed over for nothing.

The documentation is straightforward and accurate, and is provided in the form of a good old-fashioned local CHM file. This Help system may be unfashionable, but it remains infinitely superior to the still-awful system that paying AutoCAD customers have had to put up with for the last few years.

For those investigating alternatives to AutoCAD for whatever reason, the availability of DOSLib for Bricscad may help make that particular alternative a more attractive proposition.

Despite McNeel and Autodesk breaking ties many years ago, McNeel’s Dale Fugier has continued to provide, maintain and improve DOSLib. What’s more, DOSLib has remained totally free of charge and ad-free throughout its history, which dates back to 1992! Sometimes, there really is such a thing as a free lunch.

So here’s a big raised glass to Dale and Robert McNeel. Thank you for the many years of outstanding customer service in exchange for nothing but good feelings. Long may you prosper!

Disclaimer: I have no pecuniary relationship with McNeel; no money has ever changed hands in either direction. This post is totally unsolicited; I hope it comes as a pleasant surprise to McNeel.